YUV output on webcam

I have 2 cameras, one outputs RGB and it works fine. When I use the same program and change the Camera.list()[cam] to the color camera both are outputting 640x480 I get black space instead of image. I have determined that it outputs YUV from the specs. How do I capture YUV color, or convert it from YUV to gray Thanks

Tagged:

Answers

  • Answer ✓

    I am not an expert in this business... but I believe one would need to dig under the hood of the Video library and understand the implementation. This might not be enough. You could also be limited by the provided/available drivers of your camera. In other words, certain cameras might not be supported. In your case, you either try different cameras, rewrite the software driver for the camera in question or modify the video library to adapt to the current provided driver of your camera. None of those task are trivial or cheap. Not sure if anybody in the forum will be able to provide much feedback... let's hope I am wrong.

    Kf

  • Answer ✓

    You can, I think, do user-space conversion of yuv to rgb. In fact, if you only want the grey then the y component should be enough. There are code examples on the forum if you search for yuv.

Sign In or Register to comment.