Processing Forum
#include "stdafx.h" #include <cv.h> #include <vector> #include <string> #include <cxcore.h> #include <highgui.h> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { for (int k=0;k<100;k++) { std::string varimg; char format[] = "franck_000%d.jpg"; char filename[sizeof format+100]; sprintf(filename,format,k); varimg = filename ; IplImage*imgw = cvLoadImage( varimg.c_str() ); cvNamedWindow( "Example1", CV_WINDOW_AUTOSIZE ); cvRectangle(imgw, cvPoint(230,100),cvPoint(550,500),CV_RGB(255,0,0), 3); cvShowImage("Example1",imgw); cvWaitKey(1); cvReleaseImage(&imgw); } return 0;
}