A hue similarity channel. More...
#include <Channels/HueChannel.H>
Public Member Functions | |
HueChannel (OptionManager &mgr, float muR, float muG, float sigR, float sigG, float rho) | |
Constructor with parameters of the bivariate Gaussian. | |
HueChannel (OptionManager &mgr, const PixRGB< byte > hue, float sig=0.04) | |
Constuctor with sample pixel and std. | |
virtual | ~HueChannel () |
virtual destructor for inheritance | |
Image< float > | combineSubMaps () |
Combine all feature maps into a single output map. | |
virtual uint | numSubmaps () const |
always returns 1 | |
virtual Image< float > | getSubmap (const uint index) const |
This is just a caching wrapper around computeSubmap(). | |
virtual std::string | getSubmapName (const uint index) const |
Always returns "Hue". | |
Protected Member Functions | |
virtual void | doInput (const InputFrame &inframe) |
special input function to compute the hue distance map | |
Protected Attributes | |
float | itsMuR |
float | itsMuG |
float | itsSigR |
float | itsSigG |
float | itsRho |
A hue similarity channel.
Hue is represented as a bivariate Gaussian distibution in the C.I.E. color space, which is R/I vs. G/I.
Definition at line 47 of file HueChannel.H.
HueChannel::HueChannel | ( | OptionManager & | mgr, | |
float | muR, | |||
float | muG, | |||
float | sigR, | |||
float | sigG, | |||
float | rho | |||
) |
Constructor with parameters of the bivariate Gaussian.
mgr | the ModelManager to assign this channel to | |
muR | the mean of the distribution in the R/I coordinate | |
muG | the mean in the G/I coordinate of the C.I.E. color space | |
sigR | the std in R/I | |
sigG | the std in G/I | |
rho | the correlation between R/I and G/I |
Definition at line 47 of file HueChannel.C.
HueChannel::HueChannel | ( | OptionManager & | mgr, | |
const PixRGB< byte > | hue, | |||
float | sig = 0.04 | |||
) |
Constuctor with sample pixel and std.
Simplified version of the constructor that derives muR and muG from the pixel value hue, and it assumes that sigR=sigG=sig, and rho = 0.
Definition at line 59 of file HueChannel.C.
References RGBtoCIE().
HueChannel::~HueChannel | ( | ) | [virtual] |
virtual destructor for inheritance
Definition at line 74 of file HueChannel.C.
Image< float > HueChannel::combineSubMaps | ( | ) | [virtual] |
Combine all feature maps into a single output map.
This overrides SingleChannel::combineSubMaps. Instead of doing center-surround and combining across scales, we just return the hue-filtered image at the map resolution.
Reimplemented from SingleChannel.
Definition at line 90 of file HueChannel.C.
References SingleChannel::getImage(), OModelParam< T >::getVal(), SingleChannel::itsOutputRangeMin, LevelSpec::mapLevel(), maxNormalize(), maxNormTypeName(), and ModelComponent::tagName().
void HueChannel::doInput | ( | const InputFrame & | inframe | ) | [protected, virtual] |
special input function to compute the hue distance map
Reimplemented from SingleChannel.
Definition at line 78 of file HueChannel.C.
References ASSERT, hueDistance(), and Image< T >::initialized().
This is just a caching wrapper around computeSubmap().
Reimplemented from SingleChannel.
Definition at line 109 of file HueChannel.C.
References SingleChannel::getOutput().
std::string HueChannel::getSubmapName | ( | const uint | index | ) | const [virtual] |
Always returns "Hue".
Reimplemented from SingleChannel.
Definition at line 117 of file HueChannel.C.
uint HueChannel::numSubmaps | ( | ) | const [virtual] |