Ask Your Question

Revision history [back]

VideoCapture: Can I override the frame type given by my camera

I am working with a Leopard Imaging USB camera that indicates to any driver that it is delivering an 8-bit YUV format frame. However, the data is actually RAW bayer data. Apparently, due to the camera's high resolution (4912 x 3684) and 16 bit data, the images don't "fit" in a standard RAW image structure- at least that's what the vendor says.

I've tried to figure out a way to retrieve the RAW data from the frame that is returned using "read" or "retrieve" in VideoCapture but with no luck. Does anyone out there know the frame structures well enough to say how a RAW frame would be formatted if it were being read as if it were a 8-bit YUV frame? If so, how would one go about transforming the YUV image into a raw image? Is it possible that there is an undocumented keyword that allows one to specify the actual frame type?

My next thought would be to go to directly accessing the DLL that holds the videoio routines via ctypes (which has other advantages) but I haven't seen much in the way of documentation for that approach

Any help would be appreciated

M