[ create a new paste ] login | about

Link: http://codepad.org/fyK7lBxs    [ raw code | fork ]

C++, pasted on Mar 6:
#include <cv.h>
#include <highgui.h>
#include <stdlib.h>
#include <stdio.h>

int main(int argc, char* argv[])
{
	// получаем любую подключённую камеру
	CvCapture* capture = cvCreateCameraCapture(CV_CAP_ANY); //cvCaptureFromCAM( 0 );
	assert( capture );

	IplImage* frame=0;
	char *filename = "pic.jpg";
	
        // получаем кадр
	frame = cvQueryFrame( capture );
	//записываем
	cvSaveImage(filename, frame);
			
	
	// освобождаем ресурсы
	cvReleaseCapture( &capture );
	return 0;
}


Create a new paste based on this one


Comments: