This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This functions opens a video file and extracts the frames and put them into a vector of Mat(its the class for representing an img) | |
*/ | |
void extract_frames(const string &videoFilePath,vector<Mat>& frames){ | |
try{ | |
//open the video file | |
VideoCapture cap(videoFilePath); // open the video file | |
if(!cap.isOpened()) // check if we succeeded | |
CV_Error(CV_StsError, "Can not open Video file"); |