SpectralResidualChannel Class Reference

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

#include <Channels/SpectralResidualChannel.H>

Inheritance diagram for SpectralResidualChannel:
Inheritance graph
[legend]
Collaboration diagram for SpectralResidualChannel:
Collaboration graph
[legend]

List of all members.

Classes

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

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 std::string getSubmapNameShort (const uint index) const
 Get the name/description of the feature map at the given index, short version.
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.

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.


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 610 of file SpectralResidualChannel.C.

References Image< T >::initialized().

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

Not implemented.

Implements ChannelBase.

Definition at line 359 of file SpectralResidualChannel.C.

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 366 of file SpectralResidualChannel.C.

Dims SpectralResidualChannel::getMapDims (  )  const [virtual]

Return the dimensions of the output image.

Implements ChannelBase.

Definition at line 310 of file SpectralResidualChannel.C.

References ChannelBase::getInputDims(), and OModelParam< T >::getVal().

Referenced by getOutput().

Image< float > SpectralResidualChannel::getOutput (  )  [virtual]
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 getOutput(), and numSubmaps().

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 numSubmaps().

std::string SpectralResidualChannel::getSubmapNameShort ( const uint  index  )  const [virtual]

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

Implements ChannelBase.

Definition at line 348 of file SpectralResidualChannel.C.

References numSubmaps().

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 597 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.

Referenced by getSubmap(), getSubmapName(), and getSubmapNameShort().

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.

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

Save our various maps using a FrameOstream.

Reimplemented from ChannelBase.

Definition at line 555 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.


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:49 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3