mirror of
https://gitcode.com/gh_mirrors/ope/OpenFace.git
synced 2026-05-14 19:27:56 +00:00
Integrating SequenceCapture to FaceLandmarkVid
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user