Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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:

http://salman2004.imgur.com/all/

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.