int main() {
	IplImage *frame;

	CvCapture* capture = cvCaptureFromCAM(0);

	cvNamedWindow("Test", 0);

	cvResizeWindow("Test", 320, 240);

	while (capture) {
		frame = cvQueryFrame(capture);
		cvShowImage("Test", frame);

		if (cvWaitKey(33) >= 27)
			break;
	}

	cvReleaseCapture(&capture);
	cvDestroyWindow("Test");

	return 0;
}

+ Recent posts