Fix with sequence recording.

This commit is contained in:
Tadas Baltrusaitis 2017-11-06 20:24:04 +00:00
parent 0e428cca45
commit b37335052c
3 changed files with 8 additions and 4 deletions

View File

@ -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;

View File

@ -53,7 +53,7 @@ namespace Recorder
public:
// Constructors
RecorderOpenFaceParameters(std::vector<std::string> &arguments, double fps_vid_out = 30, std::string output_codec = "DIVX");
RecorderOpenFaceParameters(std::vector<std::string> &arguments, bool sequence, double fps_vid_out = 30);
bool isSequence() const { return is_sequence; }
bool output2DLandmarks() const { return output_2D_landmarks; }

View File

@ -37,13 +37,17 @@ using namespace std;
using namespace Recorder;
RecorderOpenFaceParameters::RecorderOpenFaceParameters(std::vector<std::string> &arguments, double fps_vid_out, std::string output_codec)
RecorderOpenFaceParameters::RecorderOpenFaceParameters(std::vector<std::string> &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)