• 易迪拓培训,专注于微波、射频、天线设计工程师的培养
首页 > 手机设计 > 手机硬件设计交流 > OV7640 YUV data output format

OV7640 YUV data output format

录入:edatop.com     点击:
When the OV7640 is reset, the registers have their default values.
The ones that interest me are :
COMA (at address 12h) ; default value 14h
COMB (at address 13h) ; default value A3h
COMD (at address 15h) ; default value 00h
As a result of these settings, the datasheet specifies the data coming out
of Y[7:0] is structured as follows : UYVYUYVY
On the front page of the datasheet a feature is listed as YUV (4:2:2)
I understand the 4:2:2 means that Y is sampled at twice the frequency of U
and V, which is why Y appears twice as frequently as U or V in the extract :
UYVYUYVY
I would like to clarify my understanding of the data I capture :
For each frame, I capture 640 x 480 pixels = 307200 pixels
UYVYUYVY
Pixel 1 : is a U value
Pixel 2 : is a Y value
Pixel 3 : is a V value
Pixel 4 : is a Y value
...
the first pixel of line 2 : Pixel 641 : is a U value ?
Pixel 642 : is a Y value ?
Pixel 643 : is a V value ?
Pixel 644 : is a Y value ?
For example, for pixel 642, I have the Y value, but no corresponding U or V.
So in order to estimate the U or V value for this pixel, I need to use an
algorithm such as nearest neighbor replication or bilinear interpolation?
Is this understanding correct? Or is the data packed in a similar way to
RGB 5:6:5 where within 2 bytes of Y[7:0] you get an R,G and a B value
(albeit not at 8 bits resolution!)
Thank you for your assistance.
Paul.

>When the OV7640 is reset, the registers have their default values.
>
>The ones that interest me are :
>
>COMA (at address 12h) ; default value 14h
>COMB (at address 13h) ; default value A3h
>COMD (at address 15h) ; default value 00h
>
>As a result of these settings, the datasheet specifies the data coming out
>of Y[7:0] is structured as follows : UYVYUYVY
>
>On the front page of the datasheet a feature is listed as YUV (4:2:2)
>
>I understand the 4:2:2 means that Y is sampled at twice the frequency of U
>and V, which is why Y appears twice as frequently as U or V in the extract :
>UYVYUYVY
Alternatively look at this way for every TWO Y pixels, there is only ONE
corresponding U and ONE corresponding V. You have to decode the colour
matrix of U and V to use with TWO adjacent Y points. U used with one pair
of Y and V used with a different pair (ideally).
>I would like to clarify my understanding of the data I capture :
>
>For each frame, I capture 640 x 480 pixels = 307200 pixels
>
>UYVYUYVY
>
>Pixel 1 : is a U value
>Pixel 2 : is a Y value
>Pixel 3 : is a V value
>Pixel 4 : is a Y value
>...
No that is four data points and TWO pixels.
>the first pixel of line 2 : Pixel 641 : is a U value ?
>Pixel 642 : is a Y value ?
>Pixel 643 : is a V value ?
>Pixel 644 : is a Y value ?
I would expect the first data BYTE of line 2 to be data BYTE 1281 (starting
at 1 or 1280 starting at 0).
>For example, for pixel 642, I have the Y value, but no corresponding U or V.
>So in order to estimate the U or V value for this pixel, I need to use an
>algorithm such as nearest neighbor replication or bilinear interpolation?
The bytes coming out should be in multiples of FOUR to give 4:2:2 coding,
which correspond in CCIR656 format (4:2:2 down one byte wide stream) as
twice as many data points as pixels.
>Is this understanding correct? Or is the data packed in a similar way to
>RGB 5:6:5 where within 2 bytes of Y[7:0] you get an R,G and a B value
>(albeit not at 8 bits resolution!)
You really need FOUR bytes to obtain an RGB matrix conversion as 4:2:2 should
be sampled as
Y Y Y
U U
V V
Hence the pairings of U and V for diffeent pairs of Y. Until you have the
THIRD byte at least you cannot give an RGB value for the first PIXEL.
However they are often sampled for simpler clocking and data pipeline
Y Y Y Y
U U
V V
Until you have the second pair of bytes the RGB values cannot be determined.
A good reference is Keith Jack's Video Demystified (now edition 4)
with a link from the Omnivision technical pages.
ISBN 0-7506-7822-4
Just gone from 1st edition to 4th edition myself.

good questions. but i just envy your english can be so fascinate! lol.sorry i can't help u.but i think you can help me to being a good software guy,if you dont mind. pls contect with me in mail. software@aplustec.comthis is my e-mail address.

上一篇:待机电流和camera的问题
下一篇:音频LC滤波

手机天线设计培训教程详情>>

手机天线设计培训教程 国内最全面、系统、专业的手机天线设计培训课程,没有之一;是您学习手机天线设计的最佳选择...【More..

易迪拓培训课程列表详情>>

我们是来自于研发一线的资深工程师,专注并致力于射频、微波和天线设计工程师的培养。

  网站地图