From 71407c9067f7d5e3bff8b3e9dd439b1c79aae48b Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Tue, 7 Nov 2017 07:46:25 +0000 Subject: [PATCH] isSequence fix. --- lib/local/Recorder/include/RecorderCSV.h | 2 +- lib/local/Recorder/src/RecorderCSV.cpp | 5 ++++- lib/local/Recorder/src/RecorderOpenFace.cpp | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/local/Recorder/include/RecorderCSV.h b/lib/local/Recorder/include/RecorderCSV.h index dfc5621..060f50f 100644 --- a/lib/local/Recorder/include/RecorderCSV.h +++ b/lib/local/Recorder/include/RecorderCSV.h @@ -57,7 +57,7 @@ namespace Recorder RecorderCSV(); // Opening the file and preparing the header for it - bool Open(std::string output_file_name, bool output_2D_landmarks, bool output_3D_landmarks, bool output_model_params, bool output_pose, bool output_AUs, bool output_gaze, + bool Open(std::string output_file_name, bool is_sequence, bool output_2D_landmarks, bool output_3D_landmarks, bool output_model_params, bool output_pose, bool output_AUs, bool output_gaze, int num_face_landmarks, int num_model_modes, int num_eye_landmarks, const std::vector& au_names_class, const std::vector& au_names_reg); // Closing the file and cleaning up diff --git a/lib/local/Recorder/src/RecorderCSV.cpp b/lib/local/Recorder/src/RecorderCSV.cpp index f37e3a5..e8ef507 100644 --- a/lib/local/Recorder/src/RecorderCSV.cpp +++ b/lib/local/Recorder/src/RecorderCSV.cpp @@ -47,14 +47,17 @@ RecorderCSV::RecorderCSV():output_file(){}; // TODO the other 4 constructors + destructors? // Opening the file and preparing the header for it -bool RecorderCSV::Open(std::string output_file_name, bool output_2D_landmarks, bool output_3D_landmarks, bool output_model_params, bool output_pose, bool output_AUs, bool output_gaze, +bool RecorderCSV::Open(std::string output_file_name, bool is_sequence, bool output_2D_landmarks, bool output_3D_landmarks, bool output_model_params, bool output_pose, bool output_AUs, bool output_gaze, int num_face_landmarks, int num_model_modes, int num_eye_landmarks, const std::vector& au_names_class, const std::vector& au_names_reg) { + output_file.open(output_file_name, std::ios_base::out); if (!output_file.is_open()) return false; + this->is_sequence = is_sequence; + // Set up what we are recording this->output_2D_landmarks = output_2D_landmarks; this->output_3D_landmarks = output_3D_landmarks; diff --git a/lib/local/Recorder/src/RecorderOpenFace.cpp b/lib/local/Recorder/src/RecorderOpenFace.cpp index 2db847d..76d708c 100644 --- a/lib/local/Recorder/src/RecorderOpenFace.cpp +++ b/lib/local/Recorder/src/RecorderOpenFace.cpp @@ -172,7 +172,7 @@ void RecorderOpenFace::WriteObservation() std::sort(au_names_reg.begin(), au_names_reg.end()); - csv_recorder.Open(csv_filename, params.output2DLandmarks(), params.output3DLandmarks(), params.outputPDMParams(), params.outputPose(), + csv_recorder.Open(csv_filename, params.isSequence(), params.output2DLandmarks(), params.output3DLandmarks(), params.outputPDMParams(), params.outputPose(), params.outputAUs(), params.outputGaze(), num_face_landmarks, num_model_modes, num_eye_landmarks, au_names_class, au_names_reg); }