Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to cature in GRAYSCALE directly from source

I'm capturing web cam using open cv and I'd like to get direct Grayscale image from source. Below shows a sample code that I'm using for capturing video feed. Found this reference however cant see any gray scale codes. http://docs.opencv.org/2.4/modules/highgui/doc/reading_and_writing_images_and_video.html#videocapture-set

capture = cvCreateCameraCapture(0);
if(!capture)
    printf("Video Load Error\n");

cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH, 640.00);
cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT, 480.00);

Secondly if anyone knows how to use "CV_CAP_PROP_CONVERT_RGB" with C-API. Please let me.

p.s: I'm aware that C - API is deprecated. However I'm maintaining an old project, so need to deal with it.

How to cature capture in GRAYSCALE directly from source

I'm capturing web cam using open cv and I'd like to get direct Grayscale image from source. Below shows a sample code that I'm using for capturing video feed. Found this reference however cant see any gray scale codes. http://docs.opencv.org/2.4/modules/highgui/doc/reading_and_writing_images_and_video.html#videocapture-set

capture = cvCreateCameraCapture(0);
if(!capture)
    printf("Video Load Error\n");

cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_WIDTH, 640.00);
cvSetCaptureProperty(capture, CV_CAP_PROP_FRAME_HEIGHT, 480.00);

Secondly if anyone knows how to use "CV_CAP_PROP_CONVERT_RGB" with C-API. Please let me.

p.s: I'm aware that C - API is deprecated. However I'm maintaining an old project, so need to deal with it.