Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

SpectralResidualChannel Class Reference

#include <Channels/SpectralResidualChannel.H>

Inheritance diagram for SpectralResidualChannel:

Inheritance graph
[legend]
Collaboration diagram for SpectralResidualChannel:

Collaboration graph
[legend]
List of all members.

Detailed Description

"Spectral Residual" channel based on Hou&Zhang (CVPR 2007)

See also http://bcmi.sjtu.edu.cn/~houxiaodi

Definition at line 67 of file SpectralResidualChannel.H.

Public Member Functions

 SpectralResidualChannel (OptionManager &mgr, const std::string &descrName="Spectral Residual", const std::string &tagName="SRS")
 Default constructor.
virtual ~SpectralResidualChannel ()
 Virtual destructor.
virtual void accept (ChannelVisitor &v)
 Calls visitChannelBase() on the ChannelVisitor.
virtual bool isHomogeneous () const
 Returns true.
virtual void readFrom (const ParamMap &pmap)
 Read params from the ParamMap.
virtual void writeTo (ParamMap &pmap) const
 Write params to the ParamMap.
virtual bool outputAvailable () const
 Returns true if we've gotten any input.
virtual Dims getMapDims () const
 Return the dimensions of the output image.
virtual uint numSubmaps () const
 Return the number of feature maps represented by this channel.
virtual Image< float > getSubmap (const uint index) const
 Get the feature map at the given index.
virtual std::string getSubmapName (const uint index) const
 Get the name/description of the feature map at the given index.
virtual void getFeatures (const Point2D< int > &locn, std::vector< float > &mean) const
 Not implemented.
virtual void getFeaturesBatch (std::vector< Point2D< int > * > *locn, std::vector< std::vector< float > > *mean, int *count) const
 Not implemented.
virtual Image< float > getOutput ()
 Return the spectral residual saliency map.
virtual void saveResults (const nub::ref< FrameOstream > &ofs)
 Save our various maps using a FrameOstream.
virtual void killCaches ()
 Subclasses override this to clear any caches they may maintain.
ResizeSpec getResizeSpec () const
void setResizeSpec (const ResizeSpec &s)
float getOutputBlur () const
void setOutputBlur (float f)
ResizeSpec getOutputResizeSpec () const
void setOutputResizeSpec (bool on, const ResizeSpec &s)
rutz::shared_ptr< DownsizergetDownsizer () const
void setDownsizer (rutz::shared_ptr< Downsizer > d)

Protected Member Functions

virtual void doInput (const InputFrame &inframe)
 Subclasses override this implementation of the input() function.

Classes

class  Downsizer
 This helps share downsizing calculations across multiple subchannels in a MultiSpectralResidualChannel. More...


Constructor & Destructor Documentation

SpectralResidualChannel::SpectralResidualChannel OptionManager mgr,
const std::string descrName = "Spectral Residual",
const std::string tagName = "SRS"
 

Default constructor.

Definition at line 244 of file SpectralResidualChannel.C.

SpectralResidualChannel::~SpectralResidualChannel  )  [virtual]
 

Virtual destructor.

Definition at line 273 of file SpectralResidualChannel.C.


Member Function Documentation

void SpectralResidualChannel::accept ChannelVisitor v  )  [virtual]
 

Calls visitChannelBase() on the ChannelVisitor.

Reimplemented from ChannelBase.

Definition at line 280 of file SpectralResidualChannel.C.

References ChannelVisitor::visitChannelBase().

void SpectralResidualChannel::doInput const InputFrame inframe  )  [protected, virtual]
 

Subclasses override this implementation of the input() function.

This will be called by one of the input() methods. For efficiency reasons (e.g. network bandwidth in parallel code), it is possible that the color or luminance input may be null, although the code should be wired up properly so that given subclasses do not receive a null input that they in fact need. Subclasses should be sure to ASSERT that any used inputs are non-null.

Implements ChannelBase.

Definition at line 600 of file SpectralResidualChannel.C.

References InputFrame::grayFloat(), Image< T >::initialized(), and LFATAL.

void SpectralResidualChannel::getFeatures const Point2D< int > &  locn,
std::vector< float > &  mean
const [virtual]
 

Not implemented.

Implements ChannelBase.

Definition at line 349 of file SpectralResidualChannel.C.

References LFATAL.

void SpectralResidualChannel::getFeaturesBatch std::vector< Point2D< int > * > *  locn,
std::vector< std::vector< float > > *  mean,
int *  count
const [virtual]
 

Not implemented.

Implements ChannelBase.

Definition at line 356 of file SpectralResidualChannel.C.

References LFATAL.

Dims SpectralResidualChannel::getMapDims  )  const [virtual]
 

Return the dimensions of the output image.

Implements ChannelBase.

Definition at line 310 of file SpectralResidualChannel.C.

References OModelParam< T >::getVal(), and ResizeSpec::transformDims().

Referenced by getOutput().

Image< float > SpectralResidualChannel::getOutput  )  [virtual]
 

Return the spectral residual saliency map.

Implements ChannelBase.

Definition at line 364 of file SpectralResidualChannel.C.

References ASSERT, Image< T >::begin(), Image< T >::beginw(), Image< T >::clear(), CONV_BOUNDARY_REPLICATE, CONV_BOUNDARY_ZERO, convertToString(), FourierEngine< T >::fft(), Image< T >::getDims(), Image< T >::getHeight(), getMapDims(), getMinMax(), OModelParam< T >::getOptionDef(), Image< T >::getSize(), OModelParam< T >::getVal(), Image< T >::getWidth(), gradientmag(), GVX_TRACE, Dims::h(), h, FourierInvEngine< T >::ifft(), Image< T >::initialized(), inplaceAttenuateBorders(), Dims::isNonEmpty(), joinLogampliPhase(), LDEBUG, LFATAL, LINFO, log(), logmagnitude(), ModelOptionDef::longoptname, Dims::max(), maxNormalize(), rutz::min(), MYLOGVERB, phase(), quickLocalAvg2x2(), rescaleBilinear(), Image< T >::resize(), sepFilter(), squared(), sum, ResizeSpec::transformDims(), Dims::w(), w, x, y, and ZEROS.

Image< float > SpectralResidualChannel::getSubmap const uint  index  )  const [virtual]
 

Get the feature map at the given index.

Implements ChannelBase.

Definition at line 325 of file SpectralResidualChannel.C.

References LFATAL.

std::string SpectralResidualChannel::getSubmapName const uint  index  )  const [virtual]
 

Get the name/description of the feature map at the given index.

Implements ChannelBase.

Definition at line 337 of file SpectralResidualChannel.C.

References LFATAL.

bool SpectralResidualChannel::isHomogeneous  )  const [virtual]
 

Returns true.

Reimplemented from ChannelBase.

Definition at line 286 of file SpectralResidualChannel.C.

void SpectralResidualChannel::killCaches  )  [virtual]
 

Subclasses override this to clear any caches they may maintain.

Reimplemented from ChannelBase.

Definition at line 587 of file SpectralResidualChannel.C.

References Image< T >::freeMem().

uint SpectralResidualChannel::numSubmaps  )  const [virtual]
 

Return the number of feature maps represented by this channel.

Implements ChannelBase.

Definition at line 319 of file SpectralResidualChannel.C.

bool SpectralResidualChannel::outputAvailable  )  const [virtual]
 

Returns true if we've gotten any input.

Implements ChannelBase.

Definition at line 304 of file SpectralResidualChannel.C.

References Image< T >::initialized().

void SpectralResidualChannel::readFrom const ParamMap pmap  )  [virtual]
 

Read params from the ParamMap.

Reimplemented from ChannelBase.

Definition at line 292 of file SpectralResidualChannel.C.

References ChannelBase::readFrom().

void SpectralResidualChannel::saveResults const nub::ref< FrameOstream > &  ofs  )  [virtual]
 

Save our various maps using a FrameOstream.

Reimplemented from ChannelBase.

Definition at line 545 of file SpectralResidualChannel.C.

References FLOAT_NORM_PRESERVE, OModelParam< T >::getVal(), SRC_POS, and ModelComponent::tagName().

void SpectralResidualChannel::writeTo ParamMap pmap  )  const [virtual]
 

Write params to the ParamMap.

Reimplemented from ChannelBase.

Definition at line 298 of file SpectralResidualChannel.C.

References ChannelBase::writeTo().


The documentation for this class was generated from the following files:
Generated on Sun Nov 22 13:46:36 2009 for iLab Neuromorphic Vision Toolkit by  doxygen 1.4.4