= YUV Plane Format =



The YUV image as captured by the dog's camera is 208x160 full resolution pixels, but the underlying image has a higher resolution with 
less data per pixel. Colour information (U, V) is shared among pixels while intensity (Y) is at a higher res. We currently ignore the 
higher resolution Y values, only using those pixels about which we have full information.



The underlying image is a 4:1:1 format, meaning 4 Y values, 1 U and 1 V value per macropixel (the Y plane is sampled at twice the resolution 
of the U and V planes) but we generally only use YLL as the Y value and ignore the others. What do YLL, YLH etc mean? I have no idea, but 
Jing's 2003 colour classifier code implies that they are positioned:



 YHH YHL?BR

 YLH YLL



within a macropixel.



The YUV image is stored as a series of rows of values, the Y row first, then U then V values for a row. When running offline 
(i.e. from saved YUV images) this sequence repeats so the image looks like:



 YYYYYYYY...?BR

 UUUUUUUU...?BR

 VVVVVVVV...?BR

 YYYYYYYY...?BR

 UUUUUUUU...?BR

 ...........?BR



The actual data from the camera when running online has three more rows of information though - three more Y rows, so it looks more like



 YYYYYYYY...?BR

 UUUUUUUU...?BR

 VVVVVVVV...?BR

 YYYYYYYY...?BR

 YYYYYYYY...?BR

 YYYYYYYY...?BR

 YYYYYYYY...?BR

 UUUUUUUU...?BR

 ...........



We ignore that extra data, and only process the one Y row per pixel row.



See also [wiki:BflFileFormat BFL file format] - the classified YUV images, and http://www.fourcc.org/index.php?http%3A//www.fourcc.org/yuv.php for more than you wanted to know about YUV.