How to 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/hi...
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.
setting CV_CAP_PROP_CONVERT_RGB to false won't give you a grayscale image (misassumption), but whatever native format the cam delivers (probably some sort of yuv)
also, please do not try to repair your c-legacy, or build something on top of that. you''re only producing more technical debt