From b37335052c48bdfb697ca5daa8aa57a530e5def5 Mon Sep 17 00:00:00 2001 From: Tadas Baltrusaitis Date: Mon, 6 Nov 2017 20:24:04 +0000 Subject: [PATCH] Fix with sequence recording. --- exe/FeatureExtraction/FeatureExtraction.cpp | 2 +- lib/local/Recorder/include/RecorderOpenFaceParameters.h | 2 +- lib/local/Recorder/src/RecorderOpenFaceParameters.cpp | 8 ++++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/exe/FeatureExtraction/FeatureExtraction.cpp b/exe/FeatureExtraction/FeatureExtraction.cpp index 4c389153..f22c59e7 100644 --- a/exe/FeatureExtraction/FeatureExtraction.cpp +++ b/exe/FeatureExtraction/FeatureExtraction.cpp @@ -317,7 +317,7 @@ int main (int argc, char **argv) fy = fx; } - Recorder::RecorderOpenFaceParameters recording_params(arguments); + Recorder::RecorderOpenFaceParameters recording_params(arguments, true, fps_vid_in); Recorder::RecorderOpenFace open_face_rec(output_files[f_n], input_files[f_n], recording_params); int frame_count = 0; diff --git a/lib/local/Recorder/include/RecorderOpenFaceParameters.h b/lib/local/Recorder/include/RecorderOpenFaceParameters.h index b59ffb35..9073fcf1 100644 --- a/lib/local/Recorder/include/RecorderOpenFaceParameters.h +++ b/lib/local/Recorder/include/RecorderOpenFaceParameters.h @@ -53,7 +53,7 @@ namespace Recorder public: // Constructors - RecorderOpenFaceParameters(std::vector &arguments, double fps_vid_out = 30, std::string output_codec = "DIVX"); + RecorderOpenFaceParameters(std::vector &arguments, bool sequence, double fps_vid_out = 30); bool isSequence() const { return is_sequence; } bool output2DLandmarks() const { return output_2D_landmarks; } diff --git a/lib/local/Recorder/src/RecorderOpenFaceParameters.cpp b/lib/local/Recorder/src/RecorderOpenFaceParameters.cpp index b5ea78fb..fc3a818d 100644 --- a/lib/local/Recorder/src/RecorderOpenFaceParameters.cpp +++ b/lib/local/Recorder/src/RecorderOpenFaceParameters.cpp @@ -37,13 +37,17 @@ using namespace std; using namespace Recorder; -RecorderOpenFaceParameters::RecorderOpenFaceParameters(std::vector &arguments, double fps_vid_out, std::string output_codec) +RecorderOpenFaceParameters::RecorderOpenFaceParameters(std::vector &arguments, bool sequence, double fps_vid_out) { string separator = string(1, boost::filesystem::path::preferred_separator); + this->is_sequence = sequence; + this->fps_vid_out = fps_vid_out; - this->output_codec = output_codec; + + // Default output code + this->output_codec = "DIVX"; // First check if there is a root argument (so that videos and outputs could be defined more easilly) for (size_t i = 0; i < arguments.size(); ++i)