しかし、撮影を行った際に1枚ずつ保存し続けると動作が重くなり取りこぼしが起きてしまいます。
取りこぼしが起きないようにするためにはどうしたらよいでしょうか?
環境
Windows7
opencv 2.4
Visual Studio 2010
int main(void){
CvCapture *capture = 0;
IplImage *frame=0;
char name[100];
int i;
int c;
capture = cvCreateCameraCapture (0);
cvNamedWindow ("Capture", CV_WINDOW_AUTOSIZE);
while(1){
frame= cvQueryFrame (capture);
cvShowImage ("Capture", frame);
sprintf(name,"DATA\\%05d.bmp",i);
cvSaveImage(name,frame);
c = cvWaitKey(10);
if (c == '\x1b')
break;
}
cvReleaseCapture (&capture);
cvDestroyWindow ("Capture");
return 0;
}