YIQ: Difference between revisions
m YDbDr |
(3ucky(3all (talk | contribs) →Formulas: Some tidying, added YIQ to RGB transformation algorithm. |
||
Line 12: | Line 12: | ||
== Formulas == |
== Formulas == |
||
These formulae approximate the conversion between the [[RGB]] color space and YIQ. |
|||
{| |
|||
''R'', ''G'' and ''B'' are defined on a scale from zero to one: |
|||
{| cellpadding="4" style="margin-left: 1em;" |
|||
|- |
|- |
||
|<math>R, G, B, Y \in \left[ 0, 1 \right]</math> |
|||
|- |
|- |
||
|<math>I \in \left[-0.595716 , 0.595716 \right]</math> |
|||
|- |
|- |
||
|<math>Q \in \left[ -0.522591, 0.522591 \right]</math> |
|||
|} |
|||
From RGB to YIQ: |
|||
{| |
|||
|- |
|- |
||
|align="right"|<math> |
|align="right"|<math>Y = </math>||align="right"|<math>0.299R</math>||align="right"|<math> +0.587G</math>||align="right"|<math> +0.114B</math> |
||
|- |
|- |
||
|align="right"|<math>I = </math>||align="right"|<math>0.595716R</math>||align="right"|<math> -0.274453G</math>||align="right"|<math> -0.321263B</math> |
|||
| ||<math>= 0.211456R - 0.522591G + 0.311135B</math> |
|||
|- |
|||
|align="right"|<math>Q = </math>||align="right"|<math>0.211456R</math>||align="right"|<math> -0.522591G</math>||align="right"|<math> +0.311135B</math> |
|||
|} |
|} |
||
From YIQ to RGB: |
|||
or using matrices |
|||
{| |
|||
|- |
|||
|align="right"|<math>R = </math>||align="right"|<math>Y +0.956295719758948I</math>||align="right"|<math> +0.621024416465261Q</math> |
|||
|- |
|||
|align="right"|<math>G = </math>||align="right"|<math>Y -0.272122099318510I</math>||align="right"|<math> -0.647380596825695Q</math> |
|||
|- |
|||
|align="right"|<math>B = </math>||align="right"|<math>Y -1.106989016736491I</math>||align="right"|<math> +1.704614998364648Q</math> |
|||
|} |
|||
Or, using a matrix representation: |
|||
<math> |
<math> |
||
Line 35: | Line 48: | ||
</math> |
</math> |
||
<math> |
|||
Two things to note: |
|||
\begin{bmatrix} R \\ G \\ B \end{bmatrix} |
|||
= |
|||
\begin{bmatrix} 1 & 0.956295719758948 & 0.621024416465261 \\ 1 & -0.272122099318510 & -0.647380596825695 \\ 1 & -1.106989016736491 & +1.704614998364648 \end{bmatrix} |
|||
\begin{bmatrix} Y \\ I \\ Q \end{bmatrix} |
|||
</math> |
|||
Two things to note regarding the RGB transformation matrix: |
|||
*The top row is identical to that of the [[YUV]] color space |
*The top row is identical to that of the [[YUV]] color space |
||
*If <math>\begin{bmatrix} R & G & B \end{bmatrix}^{T} = \begin{bmatrix} 1 & 1 & 1 \end{bmatrix}</math> then <math>\begin{bmatrix} Y & I & Q \end{bmatrix}^{T} = \begin{bmatrix} 1 & 0 & 0 \end{bmatrix}</math>. In other words, the top row coefficients sum to unity and the last two rows sum to zero. |
*If <math>\begin{bmatrix} R & G & B \end{bmatrix}^{T} = \begin{bmatrix} 1 & 1 & 1 \end{bmatrix}</math> then <math>\begin{bmatrix} Y & I & Q \end{bmatrix}^{T} = \begin{bmatrix} 1 & 0 & 0 \end{bmatrix}</math>. In other words, the top row coefficients sum to unity and the last two rows sum to zero. |
Revision as of 02:31, 28 June 2006
YIQ is a color space, formerly used in the NTSC television standard. I stands for in-phase, while Q stands for quadrature, referring to the components used in quadrature amplitude modulation. NTSC now uses the YUV color space, which is also used by other systems such as PAL.
The Y component represents the luma information, and is the only component used by black-and-white television receivers. I and Q represent the chrominance information. In YUV, the U and V components can be thought of as X and Y coordinates within the colorspace. I and Q can be thought of as a second pair of axes on the same graph, rotated 33°; therefore IQ and UV represent different coordinate systems on the same plane.
The YIQ system is intended to take advantage of human color-response characteristics. The eye is more sensitive to changes in the orange-blue (I) range than in the purple-green range (Q) — therefore less bandwidth is required for Q than for I. Broadcast NTSC limits I to 1.3 MHz and Q to 0.4 MHz. I and Q are frequency interleaved into the 4 MHz Y signal, which keeps the bandwidth of the overall signal down to 4.2 MHz. In YUV systems, since U and V both contain information in the orange-blue range, both components must be given the same amount of bandwidth as I to achieve similar color fidelity.
Very few television sets perform true I and Q decoding, due to the high costs of such an implementation. The Rockwell Modular Digital Radio (MDR) was one, which in 1997 could operate in frame-at-a-time mode with a PC or in realtime with the Fast IQ Processor (FIQP).
Image Processing
The YIQ representation is sometimes employed in color image processing transformations. For example, applying a histogram equalization directly to the channels in an RGB image would alter the colors in relation to one another, resulting in an image with colors that no longer make sense. Instead, the histogram equalization is applied to the Y channel of the YIQ representation of the image, which only normalizes the brightness levels of the image.
Formulas
These formulae approximate the conversion between the RGB color space and YIQ.
From RGB to YIQ:
From YIQ to RGB:
Or, using a matrix representation:
Two things to note regarding the RGB transformation matrix:
- The top row is identical to that of the YUV color space
- If then . In other words, the top row coefficients sum to unity and the last two rows sum to zero.
References
- Buchsbaum, Walter H. Color TV Servicing, third edition. Englewood Cliffs, NJ: Prentice Hall, 1975. ISBN 0-13-152397-X
See also
- Color space:
- RGB color model commonly used for color monitors
- CMYK color model for color printing
- HSV color space
- HLS color space
- RYB color model the traditional color model used by artists.
- YUV for PAL television
- YDbDr for SECAM television