imshow() sometimes don't clear previous image
#include <opencv2/highgui/highgui.hpp> #include <iostream> #include <stdio.h> #include <string> using namespace cv; using namespace std; int main() { String folder = "F:/8TH SEMESTER/Traffic Sign Dectection/30speed/*.ppm"; //string folder = ("F:/Hammad Profile/FYP/German/GTSDB/FullIJCNN2013/*.ppm"); vector<String> filenames; glob(folder, filenames); Mat myImage; for (size_t i = 0; i < filenames.size(); i++) { myImage = imread(filenames[i]); imshow("Sample Traffic signs", myImage); int c = cv::waitKey(400); } return 0; }
"For example if 1st image is display and then 2nd so it display it but some portion of 1st image is show. why this happen.
"but some portion of 1st image is show. " -- this is unclear
when small images (having different width and height ) displayed in same window consecutively, sometimes some part of previous image still visible on window.question is connected with other question... i will merge two questions into one later.