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

asked 2015-07-06 10:16:46 -0600

lefsky gravatar image

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

edit retag flag offensive close merge delete

Comments

I am having this exact same problem with the same camera. Did you ever solve this issue?

jnj11 gravatar imagejnj11 ( 2015-07-23 11:02:21 -0600 )edit

I am also having this same issue when trying to capture the RAW data in Matlab. Anyone else find a work around to either override the camera YUV format and delivering or converting it back to RAW?

deanna350 gravatar imagedeanna350 ( 2017-11-29 08:54:16 -0600 )edit