今天的課程上有學到如何用opev CV 讀取圖片及用讀取視訊...
程式碼:
// 99160556.cpp : 定義主控台應用程式的進入點。
//
#include "stdafx.h"
#include "stdlib.h"
#include <opencv/highgui.h>
int _tmain(int argc, _TCHAR* argv[])
{
CvCapture * cap=cvCreateCameraCapture(0);
IplImage * img=cvQueryFrame(cap);
while(1){
img=cvQueryFrame(cap);
cvShowImage("img", img);
int key=cvWaitKey(33);
if (key==27) break;
}
cvReleaseCapture(&cap);
system("pause");
return 0;
}
沒有留言:
張貼留言