1.hardware environment:NaroPiM1 development board,WebCam-OV2659
2.software environment:debian opencv
3.steps:
a.vi a.c
b.input codes as follows:
#include "cv.h"
#include "cxcore.h"
#include "highgui.h"
#include <iostream>
using namespace std;
int main()
{
CvCapture* capture=cvCaptureFromCAM(-1);
CvVideoWriter* video=NULL;
IplImage* frame=NULL;
int n;
if(!capture) //如果不能打开摄像头给出警告
{