1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| #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<1;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;
} |
Partager