mirror of
https://gitcode.com/gh_mirrors/ope/OpenFace.git
synced 2026-05-15 03:37:49 +00:00
Adding a dedicated FPS tracker.
This commit is contained in:
@@ -246,6 +246,12 @@ bool SequenceCapture::OpenVideoFile(std::string video_file, float fx, float fy,
|
||||
|
||||
capture.open(video_file);
|
||||
|
||||
if (!capture.isOpened())
|
||||
{
|
||||
std::cout << "Failed to open the video file at location: " << video_file << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
this->fps = capture.get(CV_CAP_PROP_FPS);
|
||||
|
||||
// Check if fps is nan or less than 0
|
||||
@@ -263,12 +269,6 @@ bool SequenceCapture::OpenVideoFile(std::string video_file, float fx, float fy,
|
||||
|
||||
vid_length = (int)capture.get(CV_CAP_PROP_FRAME_COUNT);
|
||||
|
||||
if (!capture.isOpened())
|
||||
{
|
||||
std::cout << "Failed to open the video file at location: " << video_file << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
SetCameraIntrinsics(fx, fy, cx, cy);
|
||||
|
||||
this->name = boost::filesystem::path(video_file).filename().replace_extension("").string();
|
||||
|
||||
Reference in New Issue
Block a user