home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!mucs!lilleyc
- From: lilleyc@cs.man.ac.uk (Chris Lilley)
- Newsgroups: comp.graphics
- Subject: Re: Convert YUV data to RGB
- Message-ID: <5452@m1.cs.man.ac.uk>
- Date: 24 Jul 92 18:25:09 GMT
- References: <1992Jul22.032423.13011@cs.cornell.edu>
- Sender: news@cs.man.ac.uk
- Reply-To: lilleyc@cs.man.ac.uk (Chris Lilley)
- Organization: Department of Computer Science, University of Manchester UK
- Lines: 54
-
- In article <1992Jul22.032423.13011@cs.cornell.edu>
- soam@freyja.cs.cornell.edu (Soam Acharya) writes:
-
- >I am looking for pointers in converting digital YUV data to standard RGB
- >format. Now, I believe there are multiple ways by which YUV data may be
- >represented. For example, the pbmplus toolkit has a program that converts
- >Abekas YUV bytes into a portable pixmap but I am not sure whether this is
- >the same YUV format used by the Sun VideoPix board which uses the SAA9051
- >Digital Decoder chip to convert composite video into 4:1:1 YUV data. By
- >4:1:1 format I mean for example 8-bit data where there are 8 bits of Y for
- >every 2 bits of U and V.
-
- >So, my question is: does there exist a standard way of converting the YUV
- >data ( once I have extracted the Y, U and V components ) to RGB regardless
- >of the format in which the YUV information was actually represented?
-
- As far as I know, YUV is standard. It is the basis of European PAL television
- broadcast composite video signals. It is also used by US broadcast
- composite signals, after converting UV to IQ.
-
- While the decoding is the same, the meaning of the resulting RGB is
- different. If the information came from the US, it should be colour
- corrected for an NTSC monitor. If it is European, it will be set for EBU
- monitors. Some US material is set for the SMPTE monitors - there is no way
- of telling, though ;-)
-
- in matrix form:
-
- R 1.0 0.0 1.1402 Y
- G = 1.0 -0.3959 -0.5810 U
- B 1.0 2.0294 0.0 V
-
- You invert the matrix to go the other way.
-
- Those monitors are (in CIE 1931 x,y chromaticity space)
-
- %% xR yR xG yG xB yB xW yW YW
- gamma
- %%------------------------------------------------------------------------------------
- %% BREMA standard EBU phosphors (European colour television monitor,
- D65)
- 0.64 0.33 0.29 0.60 0.15 0.06 0.3127 0.3290
- 100.0 2.2
- %% NTSC standard phosphors for US television monitors (illuminant C)
- 0.67 0.33 0.21 0.71 0.14 0.08 0.310 0.316
- 100.0 2.2
- %% SMPTE (Society of Motion Picture and Television Engineers)
- recommended practice
- 0.630 0.340 0.310 0.595 0.155 0.070 0.3127 0.3290
- 100.0 2.2
-
- sorry about the line width, there ;-)
-
- Chris
-