latest version v1.9 - last update 10 Apr 2010 |
Split image in its XYZ norm channels. More...
#include <ltiSplitImageToXYZ.h>
Public Member Functions | |
virtual const char * | getTypename () const |
virtual functor * | clone () const |
virtual bool | apply (const image &img, channel &c1, channel &c2, channel &c3) const |
virtual bool | apply (const image &img, channel8 &c1, channel8 &c2, channel8 &c3) const |
virtual bool | apply (const rgbPixel &pixel, float &c1, float &c2, float &c3) const |
virtual bool | apply (const rgbPixel &pixel, ubyte &c1, ubyte &c2, ubyte &c3) const |
Split image in its XYZ norm channels.
The following is an excerpt of this page
RGB values in a particular set of primaries can be transformed to and from CIE XYZ via a 3x3 matrix transform. These transforms involve tristimulus values, that is a set of three linear-light components that conform to the CIE color-matching functions. CIE XYZ is a special set of tristimulus values. In XYZ, any color is represented as a set of positive values.
To transform from XYZ to RGB (with D65 white point), the matrix transform used is [3]:
[ R ] [ 3.240479 -1.537150 -0.498535 ] [ X ]
[ G ] = [ -0.969256 1.875992 0.041556 ] * [ Y ]
[ B ] [ 0.055648 -0.204043 1.057311 ] [ Z ]
The range for valid R, G, B values is [0,1]. Note, this matrix has negative coefficients. Some XYZ color may be transformed to RGB values that are negative or greater than one. This means that not all visible colors can be produced using the RGB system.
The inverse transformation matrix is as follows:
[ X ] [ 0.412453 0.357580 0.180423 ] [ R ]
[ Y ] = [ 0.212671 0.715160 0.072169 ] * [ G ]
[ Z ] [ 0.019334 0.119193 0.950227 ] [ B ]
virtual bool lti::splitImageToXYZ::apply | ( | const rgbPixel & | pixel, | |
ubyte & | c1, | |||
ubyte & | c2, | |||
ubyte & | c3 | |||
) | const [virtual] |
on-copy
Implements lti::splitImage.
virtual bool lti::splitImageToXYZ::apply | ( | const rgbPixel & | pixel, | |
float & | c1, | |||
float & | c2, | |||
float & | c3 | |||
) | const [virtual] |
on-copy
Implements lti::splitImage.
virtual bool lti::splitImageToXYZ::apply | ( | const image & | img, | |
channel8 & | c1, | |||
channel8 & | c2, | |||
channel8 & | c3 | |||
) | const [virtual] |
on-copy
Implements lti::splitImage.
virtual bool lti::splitImageToXYZ::apply | ( | const image & | img, | |
channel & | c1, | |||
channel & | c2, | |||
channel & | c3 | |||
) | const [virtual] |
on-copy
Implements lti::splitImage.
virtual functor* lti::splitImageToXYZ::clone | ( | ) | const [virtual] |
returns a pointer to a clone of the functor
Implements lti::functor.
virtual const char* lti::splitImageToXYZ::getTypename | ( | ) | const [virtual] |
returns the name of this type