Hi,
I have read a few post about OV7620 and I cant find one that is related t my problem. Hope you guys can give me some advise on converting the YU data obtained from OV7620 to RGB format.
I am using the OV7620 in its default mode thus I am only getting 16bit YU data. This is the first time I am using camera chip and from the dat sheet, the following is what I have understood. Pls correct me if I a wrong.
YUV data is obtained in the following way clk 1 Y0 U0 clk 2 Y1 V1 clk 3 Y2 U2 etc
The format is 4:2:2 format thus to get RGB I need to do the following Example, To get RGB for 1st pixel, Y0 U0 and V1 is used in the computation to get RGB for 2nd pixel, Y1 U0 and V1 is used
The formula given in the data sheet to get YUV was as followed Y=0.59G +0.31R + 0.11B U/Cr = 0.713(R-Y) V/Cb = 0.594(B-r)
I used matlab to get the conversion from YUV to RGB in the following R = Y + 1.4025[U-128] G = 0.983*Y + 0.7369[U-128] - 0.3306[V-128] B = Y - 1.773[V-128]
The 128 was include to shift U and V from the range 16 - 240 to
-112 - 112.
What I did was get the YUV data using DSPIC30F6012 and transfer it t visual basic and use the RGB formula obtain above to get RGB but I neve seem to get it. the result is always a green image regardless the colou of the image taken.
I have check that there is no data corruption during transfer and is no really stuck. I have also tried other forumla found in other website wher one of which is microsoft msdn. Still, no avil.
I would really appreciate if anyone could help me out here.
Thanks in advance.