LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::splitImageToCIELuv Class Reference
[Color Analysis]

Split image in its L$^*$u$^*$v$^*$ channels. More...

#include <ltiSplitImageToCIELuv.h>

Inheritance diagram for lti::splitImageToCIELuv:
Inheritance graph
[legend]
Collaboration diagram for lti::splitImageToCIELuv:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 splitImageToCIELuv ()
virtual const char * getTypename () const
virtual functorclone () const
virtual bool apply (const image &img, channel &c1, channel &c2, channel &c3) const
virtual bool apply (const rgbPixel &pixel, float &c1, float &c2, float &c3) const

Protected Member Functions

virtual bool apply (const image &img, channel8 &c1, channel8 &c2, channel8 &c3) const
virtual bool apply (const rgbPixel &pixel, ubyte &c1, ubyte &c2, ubyte &c3) const

Static Protected Attributes

static const float * lut
static const int lutSize

Detailed Description

Split image in its L$^*$u$^*$v$^*$ channels.

The following is an excerpt of this page

CIE 1976 $L^*u^*v^*$ (CIELUV) is based directly on CIE XYZ and is another attempt to linearize the perceptibility of color differences. The non-linear relations for $L^*$, $u^*$, and $v^*$ are given below:

$L^*$ = 116 * (Y/Yn)1/3 - 16
$u^*$ = 13L* * ( u' - un' )
$v^*$ = 13L* * ( v' - vn' )

The quantities un' and vn' refer to the reference white of the light source; for the $2^\circ$ observer and illuminant C, un' = 0.2009, vn' = 0.4610 [ 1 ]. Equations for u' and v' are given below:

u' = 4X / (X + 15Y + 3Z) = 4x / ( -2x + 12y + 3 )
v' = 9Y / (X + 15Y + 3Z) = 9y / ( -2x + 12y + 3 )

The transformation from (u',v') to (x,y) is:

x = 27u' / ( 18u' - 48v' + 36 )
y = 12v' / ( 18u' - 48v' + 36 )

The transformation from CIELUV to XYZ is performed as following:

u' = u / ( 13$L^*$) + un
v' = v / ( 13$L^*$ ) + vn
Y = (( $L^*$ + 16 ) / 116 )3
X = - 9Yu' / (( u' - 4 ) v' - u'v' )
Z = ( 9Y - 15v'Y - v'X ) / 3v'

The $L^*$ value with these definitions will be between 0 and 100. This functor ensure that the outputs will be put into the usual values in the LTI-Lib, i.e. for channels the outputs will be normalized by 100, so that the luminance channel will be between 0 and 1.0. The u channel will get values between -0.865731 to 1.72906 and the v channel from -1.30445 to 1.16047.

For channel8 outputs this color space doesn't make much sense, since some values are negative.


Constructor & Destructor Documentation

lti::splitImageToCIELuv::splitImageToCIELuv (  ) 

default constructor.

Initializes (only once) the lut for the cubic root, with 2048 entries.


Member Function Documentation

virtual bool lti::splitImageToCIELuv::apply ( const rgbPixel pixel,
ubyte c1,
ubyte c2,
ubyte c3 
) const [protected, virtual]

on-copy Do not use this method yet! The output values will contain invalid data due to underflows and overflows of the valid value range!

Implements lti::splitImage.

virtual bool lti::splitImageToCIELuv::apply ( const image img,
channel8 c1,
channel8 c2,
channel8 c3 
) const [protected, virtual]

on-copy Do not use this method yet! The output channels will contain invalid data due to underflows and overflows of the channel valid value range!

Implements lti::splitImage.

virtual bool lti::splitImageToCIELuv::apply ( const rgbPixel pixel,
float &  c1,
float &  c2,
float &  c3 
) const [virtual]

on-copy Note that the output values will contain values outside the interval 0.0-1.0.

Implements lti::splitImage.

virtual bool lti::splitImageToCIELuv::apply ( const image img,
channel c1,
channel c2,
channel c3 
) const [virtual]

on-copy Note that the output channels will contain values outside the interval 0.0-1.0.

Implements lti::splitImage.

virtual functor* lti::splitImageToCIELuv::clone (  )  const [virtual]

returns a pointer to a clone of the functor

Implements lti::functor.

virtual const char* lti::splitImageToCIELuv::getTypename (  )  const [virtual]

returns the name of this type


Member Data Documentation

const float* lti::splitImageToCIELuv::lut [static, protected]

look-up-table for cubic root

const int lti::splitImageToCIELuv::lutSize [static, protected]

size of the lut for cubic root


The documentation for this class was generated from the following file:

Generated on Sat Apr 10 15:27:53 2010 for LTI-Lib by Doxygen 1.6.1