Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 53

How to capture in GRAYSCALE directly from source

$
0
0
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.

Viewing all articles
Browse latest Browse all 53

Trending Articles