diff --git a/gui/OpenFaceOffline/MainWindow.xaml.cs b/gui/OpenFaceOffline/MainWindow.xaml.cs index 5f4856e..84d3a2a 100644 --- a/gui/OpenFaceOffline/MainWindow.xaml.cs +++ b/gui/OpenFaceOffline/MainWindow.xaml.cs @@ -455,8 +455,9 @@ namespace OpenFaceOffline var au_classes = face_analyser.GetCurrentAUsClass(); recorder.SetObservationActionUnits(au_regs, au_classes); - //open_face_rec.SetObservationFaceAlign(sim_warped_img); - //open_face_rec.WriteObservation(); + recorder.SetObservationFaceAlign(face_analyser.GetLatestAlignedFace()); + + recorder.WriteObservation(); // TODO //open_face_rec.SetObservationHOG(face_model.detection_success, hog_descriptor, num_hog_rows, num_hog_cols, 31); // The number of channels in HOG is fixed at the moment, as using FHOG diff --git a/lib/local/CppInerop/RecorderInterop.h b/lib/local/CppInerop/RecorderInterop.h index 2b404f0..aa4ce46 100644 --- a/lib/local/CppInerop/RecorderInterop.h +++ b/lib/local/CppInerop/RecorderInterop.h @@ -108,6 +108,11 @@ namespace UtilitiesOF { m_recorder = new Utilities::RecorderOpenFace(in_filename_std, *parameters->GetParams(), output_directory_std); } + void WriteObservation() + { + m_recorder->WriteObservation(); + } + void SetObservationGaze(System::Tuple^ gaze_direction0, System::Tuple^ gaze_direction1, System::Tuple^ gaze_angle, List^>^ landmarks_2D, List^>^ landmarks_3D) { @@ -161,6 +166,11 @@ namespace UtilitiesOF { m_recorder->SetObservationActionUnits(au_regs_std, au_class_std); } + void SetObservationFaceAlign(OpenCVWrappers::RawImage^ aligned_face_image) + { + m_recorder->SetObservationFaceAlign(aligned_face_image->Mat); + } + void SetObservationLandmarks(List^>^ landmarks_2D, List^>^ landmarks_3D, List^ params_global, List^ params_local, double confidence, bool success) { // Construct an OpenCV matrix from the landmarks