从摄像头读取数据,显示视频,并保存视频
#include "cv.h"
#include "highgui.h"
#include "iostream"
using namespace std;
int main(int argc, char* argv[])
{
CvCapture *cap = cvCreateCameraCapture(0);//初始化相机捕获的指针
if (!cap)
{
cout << "create camera capture error..." << endl;
system("pause");