Descriptor vector class. More...
#include <Channels/DescriptorVec.H>
Public Member Functions | |
DescriptorVec (OptionManager &mgr, const std::string &descrName, const std::string &tagName, ComplexChannel *cc) | |
Constructor, need complex channel. | |
virtual | ~DescriptorVec () |
Destructor. | |
void | setInputImg (const Image< PixRGB< byte > > &img) |
Set the input image. | |
void | setFovea (Point2D< int > loc) |
Set the fovea location to create the descriptor vector. | |
Dims | getFoveaSize () |
Get the fovea dims. | |
void | setFoveaSize (Dims &d) |
Set the fovea dims. | |
void | setFoveaSize (int foveaRadius) |
Set the fovea dims. | |
Image< PixRGB< byte > > | getFoveaImage () |
Get the image under the fovea. | |
Image< PixRGB< byte > > | getHistogramImage () |
Return the image of the histogram under the fovea. | |
void | buildSIFTDV () |
Build a SIFT descriptor from the the location of the fovea. | |
void | buildParticleCountDV () |
Build a particle count descriptor from the the location of the fovea. | |
void | buildFftDV () |
Build a Fourier Transform descriptor from the the location of the fovea. | |
void | buildDV () |
Build a descriptor vector from the location of the fovea (complex channel). | |
void | buildRawDV () |
Build a descriptor vector from the location of the fovea (complex channel raw submaps). | |
void | buildLocalDV () |
void | buildSingleChannelFV (SingleChannel &sc) |
Build a feature vector from a single channel. | |
const std::vector< double > & | getFV () const |
Get the feature vector from the descriptor vector. | |
uint | getFVSize () |
Get the size of the feature vector. | |
Protected Attributes | |
ComplexChannel * | itsComplexChannel |
OModelParam< Dims > | itsFoveaSize |
Point2D< int > | itsFoveaLoc |
The size of our fovea. | |
Point2D< int > | itsAttentionLoc |
THe location of the fovea. | |
Image< PixRGB< byte > > | itsFoveaImg |
THe location of the attention point. | |
Image< PixRGB< byte > > | itsInputImg |
the image to the fovea | |
Histogram | itsFeatureHistogram |
the input image | |
FourierEngine< double > * | itsFEngine |
The feature histogram. | |
Image< complexd > | itsFTImg |
std::vector< double > | itsFV |
Descriptor vector class.
Definition at line 55 of file DescriptorVec.H.
DescriptorVec::DescriptorVec | ( | OptionManager & | mgr, | |
const std::string & | descrName, | |||
const std::string & | tagName, | |||
ComplexChannel * | cc | |||
) |
Constructor, need complex channel.
Definition at line 66 of file DescriptorVec.C.
References OModelParam< T >::setVal().
DescriptorVec::~DescriptorVec | ( | ) | [virtual] |
Destructor.
Definition at line 80 of file DescriptorVec.C.
void DescriptorVec::buildDV | ( | ) |
Build a descriptor vector from the location of the fovea (complex channel).
Definition at line 409 of file DescriptorVec.C.
References findMax(), ModelComponent::getModelParamVal(), ComplexChannel::getSubmap(), OModelParam< T >::getVal(), Image< T >::getWidth(), Dims::h(), Point2D< T >::i, itsFoveaLoc, LevelSpec::mapLevel(), ComplexChannel::numSubmaps(), and Dims::w().
void DescriptorVec::buildFftDV | ( | ) |
Build a Fourier Transform descriptor from the the location of the fovea.
Definition at line 310 of file DescriptorVec.C.
void DescriptorVec::buildParticleCountDV | ( | ) |
Build a particle count descriptor from the the location of the fovea.
Definition at line 355 of file DescriptorVec.C.
References ModelComponent::descriptiveName(), ModelComponent::getModelParamVal(), SingleChannel::getSubmap(), Image< T >::getVal(), Point2D< T >::i, itsFoveaLoc, LevelSpec::mapLevel(), ComplexChannel::numChans(), SingleChannel::numSubmaps(), and ComplexChannel::subChan().
void DescriptorVec::buildRawDV | ( | ) |
Build a descriptor vector from the location of the fovea (complex channel raw submaps).
Definition at line 461 of file DescriptorVec.C.
References downSize(), findMax(), Image< T >::getDims(), Image< T >::getHeight(), ModelComponent::getModelParamVal(), ComplexChannel::getOutput(), ComplexChannel::getRawCSmap(), ComplexChannel::getSubmap(), Image< T >::getVal(), OModelParam< T >::getVal(), Image< T >::getWidth(), Dims::h(), Point2D< T >::i, itsAttentionLoc, itsFoveaLoc, LevelSpec::mapLevel(), ComplexChannel::numSubmaps(), rescale(), and Dims::w().
Referenced by SceneUnderstanding::getFV().
void DescriptorVec::buildSIFTDV | ( | ) |
Build a SIFT descriptor from the the location of the fovea.
Build a SIFT descriptor vector.
Definition at line 290 of file DescriptorVec.C.
References itsFoveaImg.
void DescriptorVec::buildSingleChannelFV | ( | SingleChannel & | sc | ) |
Build a feature vector from a single channel.
Definition at line 581 of file DescriptorVec.C.
References ModelComponent::getModelParamVal(), SingleChannel::getSubmap(), Image< T >::getVal(), Point2D< T >::i, itsFoveaLoc, LevelSpec::mapLevel(), and SingleChannel::numSubmaps().
Get the image under the fovea.
Return the image under the fovea.
Definition at line 263 of file DescriptorVec.C.
References Image< T >::initialized(), and itsFoveaImg.
Dims DescriptorVec::getFoveaSize | ( | ) |
Get the fovea dims.
Definition at line 157 of file DescriptorVec.C.
References OModelParam< T >::getVal().
Referenced by SceneUnderstanding::getFV(), and SceneUnderstanding::highOrderRec().
const std::vector< double > & DescriptorVec::getFV | ( | ) | const |
Get the feature vector from the descriptor vector.
Definition at line 604 of file DescriptorVec.C.
Referenced by SceneUnderstanding::getFV().
uint DescriptorVec::getFVSize | ( | ) |
Get the size of the feature vector.
Definition at line 597 of file DescriptorVec.C.
References ASSERT, and ComplexChannel::numSubmaps().
Return the image of the histogram under the fovea.
Definition at line 281 of file DescriptorVec.C.
References itsFoveaImg.
void DescriptorVec::setFovea | ( | Point2D< int > | loc | ) |
Set the fovea location to create the descriptor vector.
Definition at line 90 of file DescriptorVec.C.
References Image< T >::getHeight(), OModelParam< T >::getVal(), Image< T >::getWidth(), Dims::h(), ChannelBase::hasInput(), Point2D< T >::i, itsFoveaImg, itsFoveaLoc, itsInputImg, and Dims::w().
Referenced by SceneUnderstanding::getFV().
void DescriptorVec::setFoveaSize | ( | int | foveaRadius | ) |
Set the fovea dims.
Definition at line 150 of file DescriptorVec.C.
References OModelParam< T >::setVal().
void DescriptorVec::setFoveaSize | ( | Dims & | d | ) |
Set the fovea dims.
Definition at line 144 of file DescriptorVec.C.
References OModelParam< T >::setVal().
Set the input image.
Definition at line 84 of file DescriptorVec.C.
References itsInputImg.
Referenced by SceneUnderstanding::biasFor(), and SceneUnderstanding::setImage().
Point2D<int> DescriptorVec::itsAttentionLoc [protected] |
THe location of the fovea.
Definition at line 124 of file DescriptorVec.H.
Referenced by buildRawDV().
Histogram DescriptorVec::itsFeatureHistogram [protected] |
the input image
Definition at line 127 of file DescriptorVec.H.
FourierEngine<double>* DescriptorVec::itsFEngine [mutable, protected] |
The feature histogram.
Definition at line 128 of file DescriptorVec.H.
Image<PixRGB<byte> > DescriptorVec::itsFoveaImg [protected] |
THe location of the attention point.
Definition at line 125 of file DescriptorVec.H.
Referenced by buildSIFTDV(), getFoveaImage(), getHistogramImage(), and setFovea().
Point2D<int> DescriptorVec::itsFoveaLoc [protected] |
The size of our fovea.
Definition at line 123 of file DescriptorVec.H.
Referenced by buildDV(), buildParticleCountDV(), buildRawDV(), buildSingleChannelFV(), and setFovea().
Image<PixRGB<byte> > DescriptorVec::itsInputImg [protected] |
the image to the fovea
Definition at line 126 of file DescriptorVec.H.
Referenced by setFovea(), and setInputImg().