Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Y′UV
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Conversion to/from RGB == === SDTV with BT.470 === Y′UV signals are typically created from [[RGB color model|RGB]] ([[red]], [[green]] and [[blue]]) source. Weighted values of R, G, and B are summed to produce Y′, a measure of overall brightness or luminance. U and V are computed as scaled differences between Y′ and the B and R values. PAL (NTSC used [[YIQ]], which is further rotated) standard defines the following constants,<ref>{{cite web |title=BT.470: Conventional television systems |url=https://www.itu.int/rec/R-REC-BT.470-6-199811-S/en |access-date=2021-04-16 |website=www.itu.int |page=9}}</ref> derived from BT.470 System M primaries and white point using SMPTE RP 177 (same constants called matrix coefficients were used later in [[YCbCr#ITU-R BT.601 conversion|BT.601]], although it uses 1/2 instead of 0.436 and 0.615): :<math>\begin{align} W_R &= 0.299, \\ W_G &= 1 - W_R - W_B = 0.587, \\ W_B &= 0.114, \\ U_\text{max} &= 0.436, \\ V_\text{max} &= 0.615. \end{align}</math> PAL signals in Y′UV are computed from R'G'B' (only SECAM IV used linear RGB<ref name=SECAM4>{{cite web |date=2019-02-27 |title=World Analogue Television Standards and Waveforms |url=http://www.radios-tv.co.uk/Pembers/World-TV-Standards/Colour-Standards.html#SECAM |url-status=live |access-date=2021-04-16 |archive-url=https://web.archive.org/web/20190227232952/http://www.radios-tv.co.uk/Pembers/World-TV-Standards/Colour-Standards.html#SECAM |archive-date=27 February 2019}}</ref>) as follows: :<math>\begin{align} Y' &= W_R R' + W_G G' + W_B B' = 0.299 R' + 0.587 G' + 0.114 B', \\ U &= U_\text{max} \frac{B' - Y'}{1 - W_B} \approx 0.492(B' - Y'), \\ V &= V_\text{max} \frac{R' - Y'}{1 - W_R} \approx 0.877(R' - Y'). \end{align}</math> The resulting ranges of Y′, U, and V respectively are [0, 1], [−''U''<sub>max</sub>, ''U''<sub>max</sub>], and [−''V''<sub>max</sub>, ''V''<sub>max</sub>]. Inverting the above transformation converts Y′UV to RGB: :<math>\begin{align} R' &= Y' + V \frac{1 - W_R}{V_\text{max}} = Y' + \frac{V}{0.877} = Y' + 1.14 V,\\ G' &= Y' - U \frac{W_B (1 - W_B)}{U_\text{max} W_G} - V \frac{W_R (1 - W_R)}{V_\text{max} W_G} \\ &= Y' - \frac{0.232 U}{0.587} - \frac{0.341 V}{0.587} = Y' - 0.395 U - 0.581 V, \\ B' &= Y' + U \frac{1 - W_B}{U_\text{max}} = Y' + \frac{U}{0.492} = Y' + 2.033 U. \end{align}</math> Equivalently, substituting values for the constants and expressing them as [[Matrix (mathematics)|matrices]] gives these formulas for BT.470 System M (PAL): :<math>\begin{align} \begin{bmatrix} Y' \\ U \\ V \end{bmatrix} &= \begin{bmatrix} 0.299 & 0.587 & 0.114 \\ -0.14713 & -0.28886 & 0.436 \\ 0.615 & -0.51499 & -0.10001 \end{bmatrix} \begin{bmatrix} R' \\ G' \\ B' \end{bmatrix}, \\ \begin{bmatrix} R' \\ G' \\ B' \end{bmatrix} &= \begin{bmatrix} 1 & 0 & 1.13983 \\ 1 & -0.39465 & -0.58060 \\ 1 & 2.03211 & 0 \end{bmatrix} \begin{bmatrix} Y' \\ U \\ V \end{bmatrix}. \end{align}</math> For small values of Y' it is possible to get R, G, or B values that are negative so in practice we clamp the RGB results to the interval [0,1] or more correctly clamp inside the Y'CbCr. In BT.470 a mistake was made because 0.115 was used instead of 0.114 for blue and 0.493 was the result instead of 0.492. In practice that did not affect the decoders because the approximation 1/2.03 was used.<ref>{{cite journal |title=ST 170:2004 - SMPTE Standard - For Television — Composite Analog Video Signal — NTSC for Studio Applications |url=https://ieeexplore.ieee.org/document/7291416 |archive-url=https://web.archive.org/web/20180608112731/https://ieeexplore.ieee.org/document/7291416/ |url-status=dead |archive-date=8 June 2018 |journal=St 170:2004 |date=November 2004 |pages=1–21 |doi=10.5594/SMPTE.ST170.2004|isbn=978-1-61482-335-3}}</ref> === HDTV with BT.709 === [[File:CIExy1931 Rec 2020 and Rec 709.svg|thumb|HDTV Rec. 709 (quite close to SDTV Rec. 601) compared with UHDTV [[Rec. 2020|Rec. 2020]]]] For [[high-definition video|HDTV]] the [[ATSC standards|ATSC]] decided to change the basic values for W<sub>R</sub> and W<sub>B</sub> compared to the previously selected values in the SDTV system. For HDTV these values are provided by [[Rec. 709|Rec. 709]]. This decision further impacted on the matrix for the Y′UV↔RGB conversion so that its member values are also slightly different. As a result, with SDTV and HDTV there are generally two distinct Y′UV representations possible for any RGB triple: a SDTV-Y′UV and an HDTV-Y′UV one. This means in detail that when directly converting between SDTV and HDTV, the luma (Y′) information is roughly the same but the representation of the chroma (U & V) channel information needs conversion. Still in coverage of the [[CIE 1931 color space]] the Rec. 709 color space is almost identical to Rec. 601 and covers 35.9%.<ref name=TVTechnologyDecember2012SuperHiVision>{{cite news |title="Super Hi-Vision" as Next-Generation Television and Its Video Parameters |publisher=Information Display |url=http://www.informationdisplay.org/article.cfm?year=2012&issue=12&file=art6 |access-date=1 January 2013}}</ref> In contrast to this UHDTV with Rec. 2020 covers a much larger area and thus its very own matrix was derived for YCbCr (no YUV/Y′UV, since decommissioning of analog TV). BT.709 defines these weight values: :<math>\begin{align} W_R &= 0.2126, \\ W_G &= 1 - W_R - W_B = 0.7152, \\ W_B &= 0.0722 \\ \end{align}</math> The ''U''<sub>max</sub> and ''V''<sub>max</sub> values are from above. The conversion matrices for analog form of BT.709 are these, but there is no evidence those were ever used in practice (instead only actually described form of BT.709 is used, the [[YCbCr#ITU-R BT.709 conversion|YCbCr]] form): :<math>\begin{align} \begin{bmatrix} Y' \\ U \\ V \end{bmatrix} &= \begin{bmatrix} 0.2126 & 0.7152 & 0.0722 \\ -0.09991 & -0.33609 & 0.436 \\ 0.615 & -0.55861 & -0.05639 \end{bmatrix} \begin{bmatrix} R' \\ G' \\ B' \end{bmatrix} \\ \begin{bmatrix} R' \\ G' \\ B' \end{bmatrix} &= \begin{bmatrix} 1 & 0 & 1.28033 \\ 1 & -0.21482 & -0.38059 \\ 1 & 2.12798 & 0 \end{bmatrix} \begin{bmatrix} Y' \\ U \\ V \end{bmatrix} \end{align}</math> === Notes === * The weights used to compute Y′ (top row of matrix) are identical to those used in the [[YIQ|Y′IQ]] color space. * Equal values of red, green and blue (i.e. levels of gray) yield 0 for U and V. Black, RGB=(0, 0, 0), yields YUV=(0, 0, 0). White, RGB=(1, 1, 1), yields YUV=(1, 0, 0). * These formulas are traditionally used in analog televisions and equipment; digital equipment such as [[High-definition television|HDTV]] and digital video cameras use Y′CbCr. <gallery caption="UV planes in a range of Y=[0,1] using the BT.709 matrix"> File:YUV plane 0.png|Y′ value of 0 File:YUV plane 0p5.png|Y′ value of 0.5 File:YUV plane 0p5 gamut.png|Y′ value of 0.5, with untruncated gamut shown by the center rectangle File:YUV plane 1.png|Y′ value of 1 </gallery>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Y′UV
(section)
Add topic