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

lti::splitImageToGSC Class Reference
[Color Analysis]

Split image in its c1, c2 and c3 components, as described in T. More...

#include <ltiSplitImageToGSC.h>

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

List of all members.

Public Member Functions

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 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
virtual bool getFirst (const image &img, channel &c1) const
virtual bool getFirst (const image &img, channel8 &c1) const
virtual bool getSecond (const image &img, channel &c2) const
virtual bool getSecond (const image &img, channel8 &c2) const
virtual bool getThird (const image &img, channel &c3) const
virtual bool getThird (const image &img, channel8 &c3) const

Protected Attributes

arctanLUT atan2

Detailed Description

Split image in its c1, c2 and c3 components, as described in T.

Gevers and A. Smeulders "Color-based object recognition" Pattern Recognition, Vol. 32, 1999, pp. 453-464.

This color space is appropriate when trying to detect only highlight or material changes, but ignoring shadow or shape edges.

The channels are defined as follows:

\[ \begin{aligned} c_1 &= \arctan \left( \frac{R}{\max(G,B)} \right) \cdot \frac{2}{\pi}\\ c_2 &= \arctan \left( \frac{G}{\max(R,B)} \right) \cdot \frac{2}{\pi}\\ c_3 &= \arctan \left( \frac{B}{\max(R,G)} \right) \cdot \frac{2}{\pi} \end{aligned} \]

They denote the angles of the body reflection vector and are invariant for matte, dull objects.

Please note the slightly difference with the original paper definition: all channels are normalized in order to get values between 0 and 1.

There is no merge functor for this split method.


Member Function Documentation

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

split the pixel in red green and blue values.

The values of each pixel will be between 0 and 255

Parameters:
pixel the pixel to be splitted
c1 first channel
c2 second channel
c3 third channel

Implements lti::splitImage.

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

split the pixel in red green and blue values.

The values of each pixel will be between 0.0f and 1.0f

Parameters:
pixel the pixel to be splitted
c1 first channel
c2 second channel
c3 third channel

Implements lti::splitImage.

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

split the image in red green and blue channels.

The values of each pixel will be between 0 and 255

Parameters:
img the image to be splitted
c1 first channel
c2 second channel
c3 third channel

Implements lti::splitImage.

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

split the image in red green and blue channels.

The values of each pixel will be between 0.0f and 1.0f

Parameters:
img the image to be splitted
c1 first channel
c2 second channel
c3 third channel

Implements lti::splitImage.

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

returns a pointer to a clone of the functor.

Implements lti::functor.

virtual bool lti::splitImageToGSC::getFirst ( const image img,
channel8 c1 
) const [virtual]

Returns the first of the three channels into which the image is split.

If you need only one channel, this might be faster than calling apply().

Parameters:
img the source image
c1 the extracted channel

Reimplemented from lti::splitImage.

virtual bool lti::splitImageToGSC::getFirst ( const image img,
channel c1 
) const [virtual]

Returns the first of the three channels into which the image is split.

If you need only one channel, this might be faster than calling apply().

Parameters:
img the source image
c1 the extracted channel

Reimplemented from lti::splitImage.

virtual bool lti::splitImageToGSC::getSecond ( const image img,
channel8 c2 
) const [virtual]

Returns the second of the three channels into which the image is split.

If you need only one channel, this might be faster than calling apply().

Parameters:
img the source image
c2 the extracted channel

Reimplemented from lti::splitImage.

virtual bool lti::splitImageToGSC::getSecond ( const image img,
channel c2 
) const [virtual]

Returns the second of the three channels into which the image is split.

If you need only one channel, this might be faster than calling apply().

Parameters:
img the source image
c2 the extracted channel

Reimplemented from lti::splitImage.

virtual bool lti::splitImageToGSC::getThird ( const image img,
channel8 c3 
) const [virtual]

Returns the third of the three channels into which the image is split.

If you need only one channel, this might be faster than calling apply().

Parameters:
img the source image
c3 the extracted channel

Reimplemented from lti::splitImage.

virtual bool lti::splitImageToGSC::getThird ( const image img,
channel c3 
) const [virtual]

Returns the third of the three channels into which the image is split.

If you need only one channel, this might be faster than calling apply().

Parameters:
img the source image
c3 the extracted channel

Reimplemented from lti::splitImage.

virtual const char* lti::splitImageToGSC::getTypeName (  )  const [virtual]

returns the name of this type

Reimplemented from lti::splitImage.


Member Data Documentation

arctan LUT


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