Page 1 of 1

Dumping a Frame

PostPosted: Sat Feb 18, 2006 11:53 pm
by Guest
I was viewing the hex data of the DF command and did not understand the format. What is the order for the RGB values? How can a nibble represent each RGB value when they require an 8 bit number?

Any help will be greatly appreciated.

PostPosted: Sun Feb 19, 2006 7:05 pm
by Guest
The DF command does provide four-bits of color information per color channel. The OV6620 provides pixel data in a Bayer pattern (alternating Green pixels with Red and Blue pixels). Thus, the AVRcam provides 4-bits of data for each of the captured pixels (where the captured pixels, again, are in the alternating Bayer pattern mixing RG and B). Once received by the AVRcamVIEW PC application, it does a bi-linear interpolation of the pixel data to determine an equivalent 12-bit color pixel for each pixel in the image (since there are 4-bits of red, 4-bits or green, and 4-bits of blue). Read through the AVRcamVEW Java source if you want to see the (relatively) straightforward calculation to determine each pixels color based on the above algorithm.