I have created a program reading images in the sequence. Here is my code:
int main(int argc, char** argv) {
cv::namedWindow("Example3", cv::WINDOW_AUTOSIZE);
cv::VideoCapture cap;
cap.open(string("F:/8TH SEMESTER/trial/%05d.ppm"));
//"F:/8TH SEMESTER/Traffic Sign Dectection/GTSDB/FullIJCNN2013/FullIJCNN2013/01/%05d.ppm"
cv::Mat frame;
for (;;) {
cap >> frame;
if (frame.empty()) break; // Ran out of film
cv::imshow("Example3", frame);
if (cv::waitKey(2000) >= 0) break;
}
return 0;
}
data set of images link:
when i run my program it read only first image and then give error. Can any body help ?I also try glob function but with glob function it read images one by one but the problem is that it can display image on previous image.For example if 1st image is display and then 2nd so it display it but some portion of 1st image is show.
all images must be same size
how can i check my image size. if you mean pixel and depth etc then help me. i have no idea that can i fix it @sturkmen
provide the code you tried with
glob()
. i think it is correct way"For example if 1st image is display and then 2nd so it display it but some portion of 1st image is show." this is easy to solve if i see your code.