Raulp
Raulp

Reputation: 8176

What is the default format of the raw data in the external uvc -usb Camera - yuv420 or yuv422?

What is the default format of the data captured from the external uvc-usb compliant camera.is it yuv420 or yuv422 or it depends on the camera sensor.Can any one point to the docs related to conversion algorithm of one format to another. Rgds, Softy

Upvotes: 3

Views: 4257

Answers (1)

tomato
tomato

Reputation: 749

The USB Video Class supports one packed 4:2:2 YUV format (YUY2) and one planar 4:2:0 YUV format (NV12). ( http://www.usb.org/developers/devclass_docs/USB_Video_Class_1_1_090711.zip ). The default values depends on implementation ( it can also give you a MPEG2 or h264 stream).

I'll explain the idea behind the conversions, it can be optimized afterwards:

YUV422 picture has every 2 luma points (Y), stored together with their chromas ( U and V) like this: YUYV YUYV YUYV YUYV YUYV YUYV

YUV420 is planar so you first have all the Y, then all the U and then all the V. Also the U and V planes are halved ( every second line ignored), and only is a particular U (and V) value shared by 2 points in the same line, it is also shared with the 2 points beneath them on the next line.

Upvotes: 2

Related Questions