Hello, I am deveolping a VHDL code to get a image from a OV7620 camera. Until now I have managed to get YUV image in a binary file. When I display that image the Y component is correct (monochrome image) but the problem is in U and V components. The whole image is all magenta because there isn't green component. I am using CCIR 601 YCbCr color space with formula: R = 1.164(Y – 16) + 1.596(Cr – 128) G = 1.164(Y – 16) – 0.813(Cr – 128) – 0.391(Cb – 128) B = 1.164(Y – 16) + 2.018(Cb – 128) Registers setup are in default mode except for QVGA mode (bit 5 register 14) and CCIR 601 YCrCb (bit 7:6 register 67). Thanks. --------------------------------------- Posted through http://www.EmbeddedRelated.com
YUV to RGB conversion in OV7620
Started by ●December 6, 2010
Reply by ●December 7, 20102010-12-07
In article <49ednRDxfI-hAmDRnZ2dnUVZ_tmdnZ2d@giganews.com>, jvpiera@n_o_s_p_a_m.yahoo.es says...> > Hello, > > I am deveolping a VHDL code to get a image from a OV7620 camera. Until > now I have managed to get YUV image in a binary file. When I display that > image the Y component is correct (monochrome image) but the problem is in U > and V components.Make sure you are getting U and V correctly some devices habe a bit in one of the registers to determine if the first clock edge is U or V. Does that model of sensor support a test colour bars output mode. If so use it to set up your colour decode circuit.> The whole image is all magenta because there isn't green component. I am > using CCIR 601 YCbCr color space with formula:Your data stream could be swapped because you are clocking out of phase.> R = 1.164(Y �? 16) + 1.596(Cr �? 128) > G = 1.164(Y �? 16) �? 0.813(Cr �? 128) �? 0.391(Cb �? 128) > B = 1.164(Y �? 16) + 2.018(Cb �? 128) > > Registers setup are in default mode except for QVGA mode (bit 5 register > 14) and CCIR 601 YCrCb (bit 7:6 register 67). > > Thanks. > > > > --------------------------------------- > Posted through http://www.EmbeddedRelated.com-- Paul Carpenter | paul@pcserviceselectronics.co.uk <http://www.pcserviceselectronics.co.uk/> PC Services <http://www.pcserviceselectronics.co.uk/fonts/> Timing Diagram Font <http://www.gnuh8.org.uk/> GNU H8 - compiler & Renesas H8/H8S/H8 Tiny <http://www.badweb.org.uk/> For those web sites you hate