CVR-Lib last update 20 Sep 2009

cvr::splitImageToRGB Class Reference
[Color Analysis]

Split image into its Red - Green - Blue channels. More...

#include <cvrSplitImageToRGB.h>

Inheritance diagram for cvr::splitImageToRGB:

Inheritance graph
[legend]
Collaboration diagram for cvr::splitImageToRGB:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 splitImageToRGB ()
 splitImageToRGB (const splitImageToRGB &other)
virtual ~splitImageToRGB ()
splitImageToRGBcopy (const splitImageToRGB &other)
splitImageToRGBoperator= (const splitImageToRGB &other)
virtual const std::string & name () const
virtual splitImageToRGBclone () const
virtual splitImageToRGBnewInstance () const
const parametersgetParameters () const
virtual bool apply (const matrix< image::value_type > &img, matrix< channel::value_type > &red, matrix< channel::value_type > &green, matrix< channel::value_type > &blue) const
virtual bool apply (const matrix< image::value_type > &img, matrix< channel::value_type > &red, matrix< channel::value_type > &green, matrix< channel::value_type > &blue, matrix< channel::value_type > &alpha) const
virtual bool apply (const matrix< image::value_type > &img, matrix< channel8::value_type > &red, matrix< channel8::value_type > &green, matrix< channel8::value_type > &blue) const
virtual bool apply (const matrix< image::value_type > &img, matrix< channel8::value_type > &red, matrix< channel8::value_type > &green, matrix< channel8::value_type > &blue, matrix< channel8::value_type > &alpha) const
virtual bool apply (const rgbaPixel &pixel, float &red, float &green, float &blue) const
virtual bool apply (const rgbaPixel &pixel, ubyte &red, ubyte &green, ubyte &blue) const
bool extractRed (const matrix< image::value_type > &img, matrix< channel::value_type > &red) const
bool extractRed (const matrix< image::value_type > &img, matrix< channel8::value_type > &red) const
bool extractGreen (const matrix< image::value_type > &img, matrix< channel::value_type > &green) const
bool extractGreen (const matrix< image::value_type > &img, matrix< channel8::value_type > &green) const
bool extractBlue (const matrix< image::value_type > &img, matrix< channel::value_type > &blue) const
bool extractBlue (const matrix< image::value_type > &img, matrix< channel8::value_type > &blue) const
virtual bool extractFirst (const matrix< image::value_type > &img, matrix< channel::value_type > &c1) const
virtual bool extractFirst (const matrix< image::value_type > &img, matrix< channel8::value_type > &c1) const
virtual bool extractSecond (const matrix< image::value_type > &img, matrix< channel::value_type > &c2) const
virtual bool extractSecond (const matrix< image::value_type > &img, matrix< channel8::value_type > &c2) const
virtual bool extractThird (const matrix< image::value_type > &img, matrix< channel::value_type > &c3) const
virtual bool extractThird (const matrix< image::value_type > &img, matrix< channel8::value_type > &c3) const


Detailed Description

Split image into its Red - Green - Blue channels.

You can split all the channels at the same time (with apply) or get just one channel using the shortcut functions getRed(), getGreen() or getBlue().

See also:
cvr::mergeRGBToImage

Constructor & Destructor Documentation

cvr::splitImageToRGB::splitImageToRGB (  ) 

default constructor

cvr::splitImageToRGB::splitImageToRGB ( const splitImageToRGB other  ) 

copy constructor

virtual cvr::splitImageToRGB::~splitImageToRGB (  )  [virtual]

destructor


Member Function Documentation

virtual bool cvr::splitImageToRGB::apply ( const rgbaPixel pixel,
ubyte red,
ubyte green,
ubyte blue 
) 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
red the red value
green the green value
blue the blue value

Implements cvr::splitImage.

virtual bool cvr::splitImageToRGB::apply ( const rgbaPixel pixel,
float &  red,
float &  green,
float &  blue 
) 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
red the red value
green the green value
blue the blue value
Returns:
true if successful, false otherwise.

Implements cvr::splitImage.

virtual bool cvr::splitImageToRGB::apply ( const matrix< image::value_type > &  img,
matrix< channel8::value_type > &  red,
matrix< channel8::value_type > &  green,
matrix< channel8::value_type > &  blue,
matrix< channel8::value_type > &  alpha 
) 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
red the red channel
green the green channel
blue the blue channel
alpha or dummy channel
Returns:
true if successful, false otherwise.

virtual bool cvr::splitImageToRGB::apply ( const matrix< image::value_type > &  img,
matrix< channel8::value_type > &  red,
matrix< channel8::value_type > &  green,
matrix< channel8::value_type > &  blue 
) 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
red the red channel
green the green channel
blue the blue channel
Returns:
true if successful, false otherwise.

Implements cvr::splitImage.

virtual bool cvr::splitImageToRGB::apply ( const matrix< image::value_type > &  img,
matrix< channel::value_type > &  red,
matrix< channel::value_type > &  green,
matrix< channel::value_type > &  blue,
matrix< channel::value_type > &  alpha 
) 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
red the red channel
green the green channel
blue the blue channel
alpha or dummy channel
Returns:
true if successful, false otherwise.

virtual bool cvr::splitImageToRGB::apply ( const matrix< image::value_type > &  img,
matrix< channel::value_type > &  red,
matrix< channel::value_type > &  green,
matrix< channel::value_type > &  blue 
) 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
red the red channel
green the green channel
blue the blue channel
Returns:
true if successful, false otherwise.

Implements cvr::splitImage.

virtual splitImageToRGB* cvr::splitImageToRGB::clone (  )  const [virtual]

Returns a pointer to a clone of this functor.

Implements cvr::splitImage.

splitImageToRGB& cvr::splitImageToRGB::copy ( const splitImageToRGB other  ) 

Copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

bool cvr::splitImageToRGB::extractBlue ( const matrix< image::value_type > &  img,
matrix< channel8::value_type > &  blue 
) const

shortcut to extract the red channel only The values of each pixel will be between 0 and 255

Parameters:
img the image to be splitted
blue the blue channel

bool cvr::splitImageToRGB::extractBlue ( const matrix< image::value_type > &  img,
matrix< channel::value_type > &  blue 
) const

shortcut to extract the red channel only The values of each pixel will be between 0.0f and 1.0f

Parameters:
img the image to be splitted
blue the blue channel

virtual bool cvr::splitImageToRGB::extractFirst ( const matrix< image::value_type > &  img,
matrix< channel8::value_type > &  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 cvr::splitImage.

virtual bool cvr::splitImageToRGB::extractFirst ( const matrix< image::value_type > &  img,
matrix< channel::value_type > &  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 cvr::splitImage.

bool cvr::splitImageToRGB::extractGreen ( const matrix< image::value_type > &  img,
matrix< channel8::value_type > &  green 
) const

shortcut to extract the green channel only The values of each pixel will be between 0 and 255

Parameters:
img the image to be splitted
green the green channel

bool cvr::splitImageToRGB::extractGreen ( const matrix< image::value_type > &  img,
matrix< channel::value_type > &  green 
) const

shortcut to extract the red channel only The values of each pixel will be between 0.0f and 1.0f

Parameters:
img the image to be splitted
green the green channel

bool cvr::splitImageToRGB::extractRed ( const matrix< image::value_type > &  img,
matrix< channel8::value_type > &  red 
) const

shortcut to extract the red channel only The values of each pixel will be between 0 and 255

Parameters:
img the image to be splitted
red the red channel

bool cvr::splitImageToRGB::extractRed ( const matrix< image::value_type > &  img,
matrix< channel::value_type > &  red 
) const

shortcut to get the red channel only The values of each pixel will be between 0.0f and 1.0f

Parameters:
img the image to be splitted
red the red channel

virtual bool cvr::splitImageToRGB::extractSecond ( const matrix< image::value_type > &  img,
matrix< channel8::value_type > &  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 cvr::splitImage.

virtual bool cvr::splitImageToRGB::extractSecond ( const matrix< image::value_type > &  img,
matrix< channel::value_type > &  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 cvr::splitImage.

virtual bool cvr::splitImageToRGB::extractThird ( const matrix< image::value_type > &  img,
matrix< channel8::value_type > &  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 cvr::splitImage.

virtual bool cvr::splitImageToRGB::extractThird ( const matrix< image::value_type > &  img,
matrix< channel::value_type > &  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 cvr::splitImage.

const parameters& cvr::splitImageToRGB::getParameters (  )  const

Returns used parameters.

Reimplemented from cvr::splitImage.

virtual const std::string& cvr::splitImageToRGB::name (  )  const [virtual]

Returns the name of this class.

Implements cvr::functor.

virtual splitImageToRGB* cvr::splitImageToRGB::newInstance (  )  const [virtual]

Returns a pointer to a new instance of this functor.

Implements cvr::splitImage.

splitImageToRGB& cvr::splitImageToRGB::operator= ( const splitImageToRGB other  ) 

Alias for copy member.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object


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

Generated on Sun Sep 20 22:08:52 2009 for CVR-Lib by Doxygen 1.5.8