close
顯現攝影機影像:
#include <cv.h>
#include <highgui.h>
#include <stdio.h>
int main()
{
CvCapture *capture;
IplImage *ShowImage;
capture=cvCreateCameraCapture(0);
cvNamedWindow("Webcam",0);
while(true)
{
ShowImage= cvQueryFrame(capture);
cvShowImage("Webcam",frame);
if(cvWaitKey(20)>0) break;(寫在opencv的視窗才需要此函式)
}
cvReleaseCapture(&
capture);
cvDestroyWindow("Webcam");
}
全站熱搜
留言列表