I am trying to read a series of images from a folder using the OpenCV VideoCapture function. After doing some searching on the Internet, my current code is as follows:
cv::VideoCapture cap ( "C:\\Users\\Admin\\Documents\\Images\\%02d.jpg");
I expected to see that the VideoCapture function should read all the images in this folder with the names of two serial numbers, for example 01.jpg, 02.jpg, ..., 30.jpg . Someone said on the Internet that the VideoCapture function must be ale to catch all these images as soon as I give the first location and image name. Therefore, I also tried to do it as follows:
cv::VideoCapture cap ("C:\\Users\\Admin\\Documents\\Images\\01.jpg");
But still this does not work, at least not for my case. These images have different sizes, so I will first read them, resize them and then process each of them. How can i do this? I am using Windows7 with VisualStudio. Thanks.
source share