last update 20 Sep 2009 |
#include <cvrMergeHSIToImage.h>
Public Member Functions | |
mergeHSIToImage (void) | |
virtual const std::string & | name () const |
virtual mergeHSIToImage * | clone () const |
virtual mergeHSIToImage * | newInstance () const |
virtual bool | apply (const matrix< float > &H, const matrix< float > &S, const matrix< float > &I, image &img) const |
virtual bool | apply (const matrix< ubyte > &H, const matrix< ubyte > &S, const matrix< ubyte > &I, image &img) const |
virtual bool | apply (const float &H, const float &S, const float &I, rgbaPixel &pixel) const |
virtual bool | apply (const ubyte &H, const ubyte &S, const ubyte &I, rgbaPixel &pixel) const |
It is assumed that all channels have "valid" values, i.e., if the inputs are of type cvr::channel, the Hue has values between 0.0 and 1.0 (meaning 0 to 360 degrees), Saturation and Intensity between 0.0 and 1.0. For cvr::channel8, the possible value ranges are always valid.
If any component is not valid, then unpredictible results have to be expected, including segmentation faults, as the computations use some LUT to improve speed.
The transformation from HSI to RGB depends on the value range of hue (H). It first computes chromaticity values r,g,b:
If
If
If
With these chromaticity values, the RGB tuple can easily be computed as
cvr::mergeHSIToImage::mergeHSIToImage | ( | void | ) |
Constructor.
virtual bool cvr::mergeHSIToImage::apply | ( | const ubyte & | H, | |
const ubyte & | S, | |||
const ubyte & | I, | |||
rgbaPixel & | pixel | |||
) | const [virtual] |
merge the hue value H, saturation S and intensity value I to a pixel
H | the hue value | |
S | the saturation value | |
I | the intensity value | |
pixel | the merged pixel |
Implements cvr::mergeImage.
virtual bool cvr::mergeHSIToImage::apply | ( | const float & | H, | |
const float & | S, | |||
const float & | I, | |||
rgbaPixel & | pixel | |||
) | const [virtual] |
merge the hue value H, saturation S and intensity value I to a pixel
H | the hue value | |
S | the saturation value | |
I | the intensity value | |
pixel | the merged pixel |
Implements cvr::mergeImage.
virtual mergeHSIToImage* cvr::mergeHSIToImage::clone | ( | ) | const [virtual] |
virtual const std::string& cvr::mergeHSIToImage::name | ( | ) | const [virtual] |
virtual mergeHSIToImage* cvr::mergeHSIToImage::newInstance | ( | ) | const [virtual] |