latest version v1.9 - last update 10 Apr 2010 |
Feature Saliency for color images. More...
#include <ltiFeatureSaliencyIK.h>
Classes | |
class | parameters |
the parameters for the class featureSaliencyIK More... | |
Public Member Functions | |
featureSaliencyIK () | |
featureSaliencyIK (const featureSaliencyIK &other) | |
virtual | ~featureSaliencyIK () |
virtual const char * | getTypeName () const |
bool | apply (const image &src, channel &dest) const |
bool | apply (const image &src, channel &conspIntensity, channel &conspColor, channel &conspOrientation) const |
featureSaliencyIK & | copy (const featureSaliencyIK &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
Protected Member Functions | |
void | getColorChannels (const image &img, channel &RG, channel &BY, channel &I) const |
int | getNumberPyramids () const |
int | getIndex (const int &c, const int &s) const |
void | getLimits (const int &idx, int &from, int &to) const |
void | getUpscaledPyramids (const gaussianPyramid< channel > &src, std::vector< gaussianPyramid< channel > > &usp) const |
void | subtAndNorm (const channel &a, const channel &b, channel &result) const |
void | addAndNorm (const channel &a, const channel &b, channel &result) const |
void | normAndAcc (const channel &c, channel &acc) const |
void | normalize (channel &chnl) const |
void | conspicuityI (const gaussianPyramid< channel > &pyr, channel &mapI) const |
void | conspicuityC (const gaussianPyramid< channel > &pRG, const gaussianPyramid< channel > &pBY, channel &mapI) const |
void | conspicuityO (const gaussianPyramid< channel > &p00, const gaussianPyramid< channel > &p45, const gaussianPyramid< channel > &p90, const gaussianPyramid< channel > &p135, channel &mapI) const |
void | add (const gaussianPyramid< channel > &pyr, const int &pyrIndex, const int &scale, channel &result) const |
void | itNorm (const int &steps, channel &chnl) const |
Feature Saliency for color images.
This class allows the generation of a Saliency Map from a color image based on the description in L. Itti et.at. "A Model of Saliency- Based Visual Attention for Rapid Scene Analysis", IEEE Trans. on Pattern Analysis and Machine Intelligence, Vol. 20, No. 11, November 1998
lti::featureSaliencyIK::featureSaliencyIK | ( | ) |
default constructor
lti::featureSaliencyIK::featureSaliencyIK | ( | const featureSaliencyIK & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::featureSaliencyIK::~featureSaliencyIK | ( | ) | [virtual] |
destructor
void lti::featureSaliencyIK::add | ( | const gaussianPyramid< channel > & | pyr, | |
const int & | pyrIndex, | |||
const int & | scale, | |||
channel & | result | |||
) | const [protected] |
void lti::featureSaliencyIK::addAndNorm | ( | const channel & | a, | |
const channel & | b, | |||
channel & | result | |||
) | const [protected] |
modified addition (+) of two inter-resolutional channels.
.. This does an element-wise subtraction and absolute value: result = | a + b | The member assumes "connected" channels (not lined!)
bool lti::featureSaliencyIK::apply | ( | const image & | src, | |
channel & | conspIntensity, | |||
channel & | conspColor, | |||
channel & | conspOrientation | |||
) | const |
extract the conspicuity maps of intensity, color and orientation from the given color image
src | image with the source data. | |
conspIntensity | conspicuity map for intensity | |
conspColor | conspicuity map for color | |
conspOrientation | conspicuity map for orientation |
virtual functor* lti::featureSaliencyIK::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Implements lti::functor.
void lti::featureSaliencyIK::conspicuityC | ( | const gaussianPyramid< channel > & | pRG, | |
const gaussianPyramid< channel > & | pBY, | |||
channel & | mapI | |||
) | const [protected] |
opponent colors conspicuity C(c,s)=N(RG(c,s))+N(BY(c,s)) the given pyramid must contain the subtraction of two color channels, i.e.
R-G or B-Y
void lti::featureSaliencyIK::conspicuityI | ( | const gaussianPyramid< channel > & | pyr, | |
channel & | mapI | |||
) | const [protected] |
contrast channel is define as I(c,s)=|I(c) (-) I(s)|
void lti::featureSaliencyIK::conspicuityO | ( | const gaussianPyramid< channel > & | p00, | |
const gaussianPyramid< channel > & | p45, | |||
const gaussianPyramid< channel > & | p90, | |||
const gaussianPyramid< channel > & | p135, | |||
channel & | mapI | |||
) | const [protected] |
orientation conspicuity.
The gaussian pyramids must contain gabor pyramids for the angles 0, 45, 90 and 135. (Note that gabor pyramids are a sort gaussian pyramids for the upsampling reconstruction)
featureSaliencyIK& lti::featureSaliencyIK::copy | ( | const featureSaliencyIK & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::functor.
void lti::featureSaliencyIK::getColorChannels | ( | const image & | img, | |
channel & | RG, | |||
channel & | BY, | |||
channel & | I | |||
) | const [protected] |
calculate the after Itti & Koch required color channels:
With r', g' and b' the original color channels I = (r'+g'+b')/3 r = r'/I g = g'/I b = b'/I
the red, green, blue and yellow broadly tuned color channels are defined as:
R = r-(g+b)/2; // negative values are set to zero! G = g-(r+b)/2; // negative values are set to zero! B = b-(r+g)/2; // negative values are set to zero! Y = (r+g)/2-|r-g|/2-b; // negative values are set to zero!
int lti::featureSaliencyIK::getIndex | ( | const int & | c, | |
const int & | s | |||
) | const [protected] |
void lti::featureSaliencyIK::getLimits | ( | const int & | idx, | |
int & | from, | |||
int & | to | |||
) | const [protected] |
return the used scales of the pyramid with index idx
int lti::featureSaliencyIK::getNumberPyramids | ( | ) | const [protected] |
returns the number of pyramids required to represent all reconstructed scales needed by the conspicuity maps
const parameters& lti::featureSaliencyIK::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::modifier.
virtual const char* lti::featureSaliencyIK::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("featureSaliencyIK")
Reimplemented from lti::modifier.
void lti::featureSaliencyIK::getUpscaledPyramids | ( | const gaussianPyramid< channel > & | src, | |
std::vector< gaussianPyramid< channel > > & | usp | |||
) | const [protected] |
generate the upsampling pyramids required for the given pyramid
void lti::featureSaliencyIK::itNorm | ( | const int & | steps, | |
channel & | chnl | |||
) | const [protected] |
iterative normalization
void lti::featureSaliencyIK::normalize | ( | channel & | chnl | ) | const [protected] |
normalize
accumulate the normed channel c in the accumulator-channel acc
void lti::featureSaliencyIK::subtAndNorm | ( | const channel & | a, | |
const channel & | b, | |||
channel & | result | |||
) | const [protected] |
modified subtration (-) of two inter-resolutional channels.
.. This does an element-wise subtraction and absolute value: result = | a - b | The member assumes "connected" channels (not lined!)