#include\x0d\x0a#include\x0d\x0a#include\x0d\x0aintmain()\x0d\x0a\x0d\x0aCvCapture*capture=cvCreateCameraCapture(0);\x0d\x0acvNamedWindow("camera",CV_WINDOW_AUTOSIZE);\x0d\x0aIplImage*image;\x0d\x0acharfile_name[15];\x0d\x0ainti;\x0d\x0awhile(1)\x0d\x0a\x0d\x0afor(i=0;i<99999;i++)\x0d\x0a\x0d\x0aimage=cvQueryFrame(capture);\x0d\x0aif(!image)\x0d\x0abreak;\x0d\x0acvShowImage("camera",image);\x0d\x0acharc=cvWaitKey(20);\x0d\x0aif(c==27)\x0d\x0a\x0d\x0acvReleaseCapture(&capture);\x0d\x0acvDestroyWindow("hh");\x0d\x0aexit(0);\x0d\x0a//按esc退出\x0d\x0a\x0d\x0asprintf(file_name,"d:\\%05d.jpg",i);//d盘根目录下生成\x0d\x0acvSaveImage(file_name,image);\x0d\x0a\x0d\x0a\x0d\x0aMessage(NULL,"文件名超出范围!","警告!",MB_OK);\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a\x0d\x0a供参考。参考技术A#include<highgui.h> #include<windows.h> #include<stdio.h> int main ()
CvCapture *capture=cvCreateCameraCapture(0); cvNamedWindow("camera",CV_WINDOW_AUTOSIZE); IplImage *image; char file_name[15]; int i; while(1)