Integrating SequenceCapture to FaceLandmarkVid

This commit is contained in:
Tadas Baltrusaitis
2017-11-10 18:49:30 +00:00
parent e58ccaa73d
commit d5a3af7ece
4 changed files with 64 additions and 169 deletions

View File

@@ -154,6 +154,8 @@ bool SequenceCapture::Open(std::vector<std::string> arguments)
}
}
no_input_specified = !file_found;
// Based on what was read in open the sequence TODO
if (device != -1)
{
@@ -167,7 +169,10 @@ bool SequenceCapture::Open(std::vector<std::string> arguments)
{
return OpenImageSequence(input_sequence_directory, fx, fy, cx, cy);
}
// If none opened, return false
// If no input found return false and set a flag for it
no_input_specified = true;
return false;
}
@@ -175,6 +180,8 @@ bool SequenceCapture::OpenWebcam(int device, int image_width, int image_height,
{
INFO_STREAM("Attempting to read from webcam: " << device);
no_input_specified = false;
if (device < 0)
{
std::cout << "Specify a valid device" << std::endl;
@@ -232,6 +239,8 @@ bool SequenceCapture::OpenVideoFile(std::string video_file, float fx, float fy,
{
INFO_STREAM("Attempting to read from file: " << video_file);
no_input_specified = false;
latest_frame = cv::Mat();
latest_gray_frame = cv::Mat();
@@ -272,6 +281,8 @@ bool SequenceCapture::OpenImageSequence(std::string directory, float fx, float f
{
INFO_STREAM("Attempting to read from directory: " << directory);
no_input_specified = false;
image_files.clear();
boost::filesystem::path image_directory(directory);