I want to read around 50 video frames using cv::VideoCapture, then call these 50 images one by one to do some other work. For doing this, I tried using resize and some other method, but still couldn't solved it. For instance, I get images from a video like this:
cv::VideoCapture myCapture(0);
while(true)
{
cv::Mat inputFrame;
myCapture>>inputFrame;
}
I want to save the first 50 inputFrame
, then call them one-by-one later to do some other work. Processing the current frame first and then reading the next frame is not what I want to do. Also, I don't want to write them first into my hard disk then read them. I want a kind of cell that contains image matrix. Is there any solution?