last update 20 Sep 2009 |
#include <cvrSplitImageToYIQ.h>
Public Member Functions | |
virtual const std::string & | name () const |
virtual splitImageToYIQ * | clone () const |
virtual splitImageToYIQ * | newInstance () const |
virtual bool | apply (const matrix< rgbaPixel > &img, matrix< float > &Y, matrix< float > &I, matrix< float > &Q) const |
virtual bool | apply (const matrix< rgbaPixel > &img, matrix< ubyte > &Y, matrix< ubyte > &I, matrix< ubyte > &Q) const |
virtual bool | apply (const rgbaPixel &pixel, float &Y, float &I, float &Q) const |
virtual bool | apply (const rgbaPixel &pixel, ubyte &Y, ubyte &I, ubyte &Q) const |
The following is an excerpt of this page
The YIQ system is the color primary system adopted by National Television System Committee (NTSC) for color TV broadcasting. The YIQ color solid is made by a linear transformation of the RGB cube. Its purpose is to exploit certain characteristics of the human eye to maximize the utilization of a fixed bandwidth. The human visual system is more sensitive to changes in luminance than to changes in hue or saturation, and thus a wider bandwidth should be dedicated to luminance than to color information. Y is similar to perceived luminance, I and Q carry color information and some luminance information. The Y signal usually has 4.2 MHz bandwidth in a 525 line system. Originally, the I and Q had different bandwidths (1.5 and 0.6 MHz), but now they commonly have the same bandwidth of 1 MHz.
Here is the RGB -> YIQ conversion:
[ Y ] [ 0.299 0.587 0.114 ] [ R ] [ I ] = [ 0.596 -0.275 -0.321 ] [ G ] [ Q ] [ 0.212 -0.523 0.311 ] [ B ]
[ R ] [ 1 0.956 0.621 ] [ Y ] [ G ] = [ 1 -0.272 -0.647 ] [ I ] [ B ] [ 1 -1.105 1.702 ] [ Q ]
This color space is not used anymore. Modern systems use the YUV, YCbCr or YPbPr spaces instead.
virtual bool cvr::splitImageToYIQ::apply | ( | const rgbaPixel & | pixel, | |
ubyte & | Y, | |||
ubyte & | I, | |||
ubyte & | Q | |||
) | const [virtual] |
split the pixel in YIQ.
YIQ splitting produces unnormalized values !
pixel | the pixel to be splitted | |
Y | the perceived luminance | |
I | color information and some luminance | |
Q | color information and some luminance |
Implements cvr::splitImage.
virtual bool cvr::splitImageToYIQ::apply | ( | const rgbaPixel & | pixel, | |
float & | Y, | |||
float & | I, | |||
float & | Q | |||
) | const [virtual] |
split the pixel in YIQ.
YIQ splitting produces unnormalized values !
pixel | the pixel to be splitted | |
Y | the perceived luminance | |
I | color information and some luminance | |
Q | color information and some luminance |
Implements cvr::splitImage.
virtual splitImageToYIQ* cvr::splitImageToYIQ::clone | ( | ) | const [virtual] |
virtual const std::string& cvr::splitImageToYIQ::name | ( | ) | const [virtual] |
virtual splitImageToYIQ* cvr::splitImageToYIQ::newInstance | ( | ) | const [virtual] |