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

SingleChannel Class Reference

#include <Channels/SingleChannel.H>

Inheritance diagram for SingleChannel:

Inheritance graph
[legend]
Collaboration diagram for SingleChannel:

Collaboration graph
[legend]
List of all members.

Detailed Description

SingleChannel represents a single stream of processing.

The processing is implemented by an internal PyrBuilder object of some kind.

Definition at line 58 of file SingleChannel.H.

Public Member Functions

 SingleChannel (OptionManager &mgr, const std::string &descrName, const std::string &tagName, const VisualFeature vs, rutz::shared_ptr< PyrBuilder< float > > pyr)
 Constructor. See ChannelBase.H.
virtual ~SingleChannel ()
 destructor
virtual void reset1 ()
 Reset SingleChannel.
virtual void accept (ChannelVisitor &v)
 Calls visitSingleChannel() on the ChannelVisitor.
virtual void paramChanged (ModelParamBase *const param, const bool valueChanged, ParamClient::ChangeStatus *status)
 Overload so that we can reconfigure when our params get changed.
void inputPyramid (const ImageSet< float > &pyramid, const SimTime &t, const Image< byte > &clipMask=Image< byte >())
 Send an already computed pyramid as input to the channel.
virtual ImageSet< float > computePyramid (const Image< float > &bwimg, const rutz::shared_ptr< PyramidCache< float > > &cache)
 Computes the channel's pyramid but doesn't store it.
virtual void readFrom (const ParamMap &pmap)
 Read params from the ParamMap.
virtual void writeTo (ParamMap &pmap) const
 Write params to the ParamMap.
void setTempl (const uint cntr, const uint surr, Image< float > &templ)
 Set the template that will be applied to the submap.
void setBiasMask (Image< float > &biasMask)
 Set the mask that will be applied to the submap.
Image< float > getBiasMask () const
 Set the mask that will be applied to the submap.
Image< float > getTempl (const uint cntr, const uint surr) const
 Get the template that is beeing applied to the submap.
virtual bool outputAvailable () const
 Query whether the channel is ready to give yield valid output.
bool hasPyramid () const
 do we have any input pyramids in our queue?
bool hasOutputCache () const
 have we already computed and cached the current output?
virtual Dims getMapDims () const
 Return the dimensions of the output image.
virtual const Image< float > & getImage (const uint lev) const
 Get the image from the given level of the internal pyramid.
virtual Image< float > centerSurround (const uint cntr, const uint surr) const
 Get the center/surround image for the given levels.
virtual void centerSurround (const uint cntr, const uint surr, Image< float > &pos, Image< float > &neg) const
 Get the center/surround, split into positive and negative parts.
virtual uint numSubmaps () const
 Return the number of feature maps represented by this channel.
virtual Image< float > getSubmap (const uint index) const
 This is just a caching wrapper around computeSubmap().
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
virtual void getFeatures (const Point2D< int > &locn, std::vector< float > &mean) const
virtual void getFeaturesBatch (std::vector< Point2D< int > * > *locn, std::vector< std::vector< float > > *mean, int *count) const
void saveStats (const Image< float > img, const short idx)
 save basic stats for single channel
virtual Image< float > getOutput ()
 This is just a caching wrapper around combineSubMaps().
virtual Image< float > combineSubMaps ()
 Combine all feature maps into a single output map.
virtual void saveResults (const nub::ref< FrameOstream > &ofs)
 Save our various maps using an FrameOstream.
size_t numPyramids () const
 Get the number of pyramids in our queue.
const ImageSet< float > & pyramid (const uint index) const
 Access to the underlying pyramid is provided for completeness.
SimTime pyramidTime (const uint index) const
 Access to the underlying pyramid times is provided for completeness.
const ImageSet< float > & clipPyramid () const
 Access to the underlying clipPyramid.
LevelSpec getLevelSpec () const
 get our the LevelSpec
int getNormType () const
 get our NormType:
virtual void killCaches ()
 SingleChannel implements this to clear its cached output.
void storeOutputCache (const Image< float > &m)
 Store m as the output map.
void storePyramid (const ImageSet< float > &p, const SimTime &t)
 Stores p as the channel's pyramid at time t.
void storeClipPyramid (const ImageSet< float > &p)
 Store p as the channel's clip pyramid.
void setClipPyramid (const Image< byte > &clipMask)
 make the clipping pyramid from the clip mask
void storeSubmapCache (const ImageSet< float > &p)
 Store p as the channel's submap cache.
void setInputHandler (rutz::shared_ptr< InputHandler > h)
 Install an input handler.
rutz::shared_ptr< InputHandlercloneInputHandler () const
 Get a cloned copy of our input handler.
virtual Image< float > getRawCSmap (const uint idx) const
 get raw CS map; part of getSubmap()
Image< float > postProcessMap (const Image< float > &smap, const uint idx) const
 rescale and post-process raw CS map; part of default getSubMap()
void setSubmapAlgorithm (nub::ref< SubmapAlgorithm > algo)
 Install a new submap algorithm.
void setComputeFullPyramid (bool v)
int getMinPyrLevel () const
int getMaxPyrLevel () const

Protected Member Functions

virtual void doInput (const InputFrame &inframe)
 SingleChannel requires only luminance input.
void setPyramid (rutz::shared_ptr< PyrBuilder< float > > pyr)
 Change to use a different pyramid object.
ImageSet< float > & pyrMut (const uint index)
 Mutable access to underlying pyramid.
virtual void start1 ()
virtual void stop2 ()
uint csToIndex (uint centerlev, uint surroundlev) const

Protected Attributes

NModelParam< bool > itsTakeAbs
NModelParam< bool > itsNormalizeOutput
NModelParam< bool > itsScaleNoiseToMax
NModelParam< float > itsLowThresh
NModelParam< bool > itsRectifyPyramid
NModelParam< bool > itsComputeFullPyramid
OModelParam< bool > itsUseRandom
OModelParam< bool > itsUseSplitCS
OModelParam< LevelSpecitsLevelSpec
OModelParam< MaxNormTypeitsNormType
OModelParam< int > itsQlen
OModelParam< bool > itsUseOlderVersion
OModelParam< double > itsTimeDecay
 Time decay for the contribution of differences in the pyramid queue.
OModelParam< bool > itsSaveRawMaps
 Save our raw pyramid levels?
OModelParam< bool > itsComputeFullPyramidForGist
 save our raw pyramid levels for the gist computation?
OModelParam< bool > itsSaveFeatureMaps
 Save our center-surround feature maps?
OModelParam< bool > itsSaveOutputMap
 Save our output map?
OModelParam< std::stringitsSubmapAlgoType
 Type name for our SubmapAlgorithm.
OModelParam< bool > itsGetSingleChannelStats
 Save basic single channel stats after combineSubMaps.
OModelParam< bool > itsSaveStatsPerChannel
 If saving stats, should we put each feature in its own file?
OModelParam< bool > itsSaveStatsPerChannelFreq
 Should we save frequency information per channel?
OModelParam< std::stringitsGetSingleChannelStatsFile
 File name for single channel stats after combineSubMaps.
OModelParam< std::stringitsGetSingleChannelStatsTag
 Tag name for single channel stats after combineSubMaps.
OModelParam< float > itsOutputRangeMin
 Set a fixed range of values for the raw output.
OModelParam< float > itsOutputRangeMax

Friends

class OrientationChannel
class RGBConvolveChannel

Classes

struct  TPyr
 a time-stamped pyramid More...


Constructor & Destructor Documentation

SingleChannel::SingleChannel OptionManager mgr,
const std::string descrName,
const std::string tagName,
const VisualFeature  vs,
rutz::shared_ptr< PyrBuilder< float > >  pyr
 

Constructor. See ChannelBase.H.

Parameters:
mgr our ModelManager (see ModelManager.H)
descrName descriptive name for human usage
tagName name for ParamMap usage
vs The VisualFeature implemented by the channel
pyr The type of pyramid that should be used.

Definition at line 71 of file SingleChannel.C.

References ModelComponent::addSubComponent(), SubmapAlgorithm::getFactory(), OModelParam< T >::getVal(), GVX_TRACE, rutz::factory< nub::ref< P > >::is_valid_key(), itsSubmapAlgoType, SubmapAlgorithm::make(), and ComponentFactory< P >::registerType().

SingleChannel::~SingleChannel  )  [virtual]
 

destructor

Definition at line 122 of file SingleChannel.C.

References GVX_TRACE.


Member Function Documentation

void SingleChannel::accept ChannelVisitor v  )  [virtual]
 

Calls visitSingleChannel() on the ChannelVisitor.

Reimplemented from ChannelBase.

Definition at line 176 of file SingleChannel.C.

References GVX_TRACE, and ChannelVisitor::visitSingleChannel().

void SingleChannel::centerSurround const uint  cntr,
const uint  surr,
Image< float > &  pos,
Image< float > &  neg
const [virtual]
 

Get the center/surround, split into positive and negative parts.

Reimplemented in SingleOpponentChannel.

Definition at line 328 of file SingleChannel.C.

References ASSERT, centerSurround(), centerSurroundDiff(), CLFATAL, LevelSpec::csOK(), exp(), OModelParam< T >::getVal(), GVX_TRACE, i, itsLevelSpec, itsTimeDecay, and t.

Image< float > SingleChannel::centerSurround const uint  cntr,
const uint  surr
const [virtual]
 

Get the center/surround image for the given levels.

Reimplemented in DummyChannel, and SingleOpponentChannel.

Definition at line 296 of file SingleChannel.C.

References ASSERT, centerSurroundDiff(), CLFATAL, LevelSpec::csOK(), exp(), NModelParam< T >::getVal(), OModelParam< T >::getVal(), GVX_TRACE, i, itsLevelSpec, itsTakeAbs, itsTimeDecay, and t.

Referenced by centerSurround(), and getRawCSmap().

const ImageSet< float > & SingleChannel::clipPyramid  )  const
 

Access to the underlying clipPyramid.

Definition at line 792 of file SingleChannel.C.

References GVX_TRACE.

Referenced by SingleOpponentChannel::centerSurround().

rutz::shared_ptr< InputHandler > SingleChannel::cloneInputHandler  )  const
 

Get a cloned copy of our input handler.

Definition at line 1076 of file SingleChannel.C.

References InputHandler::clone(), and GVX_TRACE.

Image< float > SingleChannel::combineSubMaps  )  [virtual]
 

Combine all feature maps into a single output map.

Reimplemented in HueChannel.

Definition at line 813 of file SingleChannel.C.

References Image< T >::clear(), ModelComponent::descriptiveName(), findMax(), getMapDims(), getMinMax(), getSubmap(), NModelParam< T >::getVal(), OModelParam< T >::getVal(), goodness_map(), GVX_TRACE, LevelSpec::indexToCS(), inplacePaste(), itsGetSingleChannelStats, itsLevelSpec, itsNormalizeOutput, itsNormType, itsOutputRangeMax, itsOutputRangeMin, LDEBUG, LINFO, LevelSpec::maxIndex(), maxNormalize(), maxNormTypeName(), MYLOGVERB, output(), p, saveStats(), ModelComponent::tagName(), templMatch(), VCXNORM_LANDMARK, w, and ZEROS.

Referenced by getOutput().

ImageSet< float > SingleChannel::computePyramid const Image< float > &  bwimg,
const rutz::shared_ptr< PyramidCache< float > > &  cache
[virtual]
 

Computes the channel's pyramid but doesn't store it.

Reimplemented in DirectionChannel.

Definition at line 678 of file SingleChannel.C.

References cache, doLowThresh(), doLowThreshAbs(), doRectify(), getMaxPyrLevel(), NModelParam< T >::getVal(), GVX_TRACE, itsLowThresh, and itsRectifyPyramid.

Referenced by DirectionChannel::computePyramid(), and doInput().

uint SingleChannel::csToIndex uint  centerlev,
uint  surroundlev
const [protected]
 

If you overload this, make sure you call SingleChannel::stop1() at the beginning of your overload

Definition at line 1015 of file SingleChannel.C.

References LevelSpec::csToIndex(), OModelParam< T >::getVal(), GVX_TRACE, and itsLevelSpec.

Referenced by getTempl(), and setTempl().

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

SingleChannel requires only luminance input.

Implements ChannelBase.

Reimplemented in DisparityChannel, DummyChannel, EntropyChannel, FlickerChannel, ForegroundDetectionChannel, HueChannel, InformationChannel, JunctionChannel, MichelsonChannel, MSTChannel, PN03contrastChannel, RGBConvolveChannel, ScorrChannel, SIFTChannel, SobelChannel, TcorrChannel, and VarianceChannel.

Definition at line 639 of file SingleChannel.C.

References ASSERT, CLFATAL, InputFrame::clipMask(), computePyramid(), InputFrame::grayFloat(), GVX_TRACE, Image< T >::initialized(), rutz::shared_ptr< T >::is_valid(), InputFrame::pyrCache(), setClipPyramid(), storePyramid(), and InputFrame::time().

Referenced by MichelsonChannel::doInput(), HueChannel::doInput(), and FlickerChannel::doInput().

Image< float > SingleChannel::getBiasMask  )  const
 

Set the mask that will be applied to the submap.

Definition at line 237 of file SingleChannel.C.

References GVX_TRACE.

const Image< float > & SingleChannel::getImage const uint  lev  )  const [virtual]
 

Get the image from the given level of the internal pyramid.

Definition at line 288 of file SingleChannel.C.

References CLFATAL, and GVX_TRACE.

Referenced by apply_gabor_filter(), HueChannel::combineSubMaps(), and MichelsonChannel::doInput().

LevelSpec SingleChannel::getLevelSpec  )  const
 

get our the LevelSpec

Definition at line 799 of file SingleChannel.C.

References OModelParam< T >::getVal(), GVX_TRACE, and itsLevelSpec.

Referenced by BiasValImage::BiasValImage(), BiasSettingsDialog::setupTab(), StereoChannel::start1(), BiasValImage::updateValues(), OptimalGainsFinder::visitSingleChannel(), JetSpecFiller::visitSingleChannel(), JetFiller::visitSingleChannel(), GuidedSearchBiaser::visitSingleChannel(), and FeatureBiaser::visitSingleChannel().

Dims SingleChannel::getMapDims  )  const [virtual]
 

Return the dimensions of the output image.

Implements ChannelBase.

Reimplemented in DummyChannel, and ForegroundDetectionChannel.

Definition at line 278 of file SingleChannel.C.

References ChannelBase::getInputDims(), OModelParam< T >::getVal(), GVX_TRACE, Dims::h(), itsLevelSpec, and LevelSpec::mapLevel().

Referenced by combineSubMaps(), SubmapAlgorithmBiased::compute(), getOutput(), getRawCSmap(), postProcessMap(), and OptimalGainsFinder::visitSingleChannel().

int SingleChannel::getNormType  )  const
 

get our NormType:

Definition at line 806 of file SingleChannel.C.

References OModelParam< T >::getVal(), GVX_TRACE, and itsNormType.

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

This is just a caching wrapper around combineSubMaps().

Implements ChannelBase.

Reimplemented in EntropyChannel, ForegroundDetectionChannel, InformationChannel, MichelsonChannel, PN03contrastChannel, ScorrChannel, SIFTChannel, SobelChannel, TcorrChannel, and VarianceChannel.

Definition at line 971 of file SingleChannel.C.

References CLFATAL, combineSubMaps(), getMapDims(), GVX_TRACE, Image< T >::initialized(), LERROR, and ZEROS.

Referenced by BiasValImage::BiasValImage(), OrientationChannel::doInteractions(), saveResults(), and OptimalGainsFinder::visitSingleChannel().

Image< float > SingleChannel::getRawCSmap const uint  idx  )  const [virtual]
 

get raw CS map; part of getSubmap()

Reimplemented from ChannelBase.

Reimplemented in ForegroundDetectionChannel.

Definition at line 378 of file SingleChannel.C.

References ASSERT, binaryReverse(), centerSurround(), CLFATAL, getMapDims(), getMinMax(), OModelParam< T >::getVal(), GVX_TRACE, LevelSpec::indexOK(), LevelSpec::indexToCS(), itsLevelSpec, itsNormType, itsUseSplitCS, LDEBUG, maxNormalize(), MYLOGVERB, ModelComponent::tagName(), w, and ZEROS.

Referenced by BiasValImage::BiasValImage(), SingleChannelSurprise< SMODEL >::compute(), SubmapAlgorithmStd::compute(), SubmapAlgorithmBiased::compute(), and BiasValImage::updateValues().

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

This is just a caching wrapper around computeSubmap().

Implements ChannelBase.

Reimplemented in ForegroundDetectionChannel, and HueChannel.

Definition at line 367 of file SingleChannel.C.

References GVX_TRACE.

Referenced by BiasValImage::BiasValImage(), DescriptorVec::buildParticleCountDV(), DescriptorVec::buildSingleChannelFV(), combineSubMaps(), saveResults(), BiasValImage::updateValues(), and OptimalGainsFinder::visitSingleChannel().

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

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

This function is intended to be implemented by subclasses so that it recurses into any nested channels, mapping nested submaps into a linear sequence of indices. The output of this function is intended only to be human-readable (e.g. for labeling image displays), and does not have to follow any particular parseable syntax.

Implements ChannelBase.

Reimplemented in ForegroundDetectionChannel, and HueChannel.

Definition at line 505 of file SingleChannel.C.

References ASSERT, ModelComponent::descriptiveName(), OModelParam< T >::getVal(), GVX_TRACE, LevelSpec::indexOK(), LevelSpec::indexToCS(), itsLevelSpec, and sformat().

Image< float > SingleChannel::getTempl const uint  cntr,
const uint  surr
const
 

Get the template that is beeing applied to the submap.

Definition at line 244 of file SingleChannel.C.

References csToIndex(), and GVX_TRACE.

bool SingleChannel::hasOutputCache  )  const
 

have we already computed and cached the current output?

Definition at line 271 of file SingleChannel.C.

References GVX_TRACE, and Image< T >::initialized().

Referenced by SingleChannelBeo::waitForOutput().

bool SingleChannel::hasPyramid  )  const
 

do we have any input pyramids in our queue?

Definition at line 264 of file SingleChannel.C.

References GVX_TRACE.

void SingleChannel::inputPyramid const ImageSet< float > &  pyramid,
const SimTime t,
const Image< byte > &  clipMask = Imagebyte >()
 

Send an already computed pyramid as input to the channel.

Definition at line 665 of file SingleChannel.C.

References GVX_TRACE, killCaches(), setClipPyramid(), and storePyramid().

void SingleChannel::killCaches  )  [virtual]
 

SingleChannel implements this to clear its cached output.

Reimplemented from ChannelBase.

Definition at line 625 of file SingleChannel.C.

References Image< T >::freeMem(), OModelParam< T >::getVal(), GVX_TRACE, i, itsLevelSpec, ChannelBase::killCaches(), LevelSpec::maxIndex(), and ModelComponent::started().

Referenced by MSTChannel::doInput(), JunctionChannel::doInput(), SingleChannelBeo::handleInput(), inputPyramid(), setBiasMask(), setTempl(), SingleOpponentChannel::singleOpponentInput(), OptimalGainsFinder::visitSingleChannel(), WeightFinder::visitSingleChannel(), and FeatureBiaser::visitSingleChannel().

size_t SingleChannel::numPyramids  )  const
 

Get the number of pyramids in our queue.

Definition at line 767 of file SingleChannel.C.

References GVX_TRACE.

Referenced by JetFiller::visitSingleChannel().

uint SingleChannel::numSubmaps  )  const [virtual]
 

Return the number of feature maps represented by this channel.

Implements ChannelBase.

Reimplemented in ForegroundDetectionChannel, and HueChannel.

Definition at line 360 of file SingleChannel.C.

References OModelParam< T >::getVal(), GVX_TRACE, itsLevelSpec, and LevelSpec::maxIndex().

Referenced by DescriptorVec::buildParticleCountDV(), DescriptorVec::buildSingleChannelFV(), SingleOpponentChannel::getFeatures(), getFeatures(), SingleOpponentChannel::getFeaturesBatch(), getFeaturesBatch(), saveResults(), BiasSettingsDialog::setupTab(), storeSubmapCache(), MaskBiaser::visitSingleChannel(), OptimalGainsFinder::visitSingleChannel(), GuidedSearchBiaser::visitSingleChannel(), WeightFinder::visitSingleChannel(), and FeatureBiaser::visitSingleChannel().

bool SingleChannel::outputAvailable  )  const [virtual]
 

Query whether the channel is ready to give yield valid output.

In some cases (e.g. with motion channels), it may take several input frames before the channel is fully initialized.

Implements ChannelBase.

Reimplemented in DummyChannel, EntropyChannel, ForegroundDetectionChannel, InformationChannel, MichelsonChannel, PN03contrastChannel, ScorrChannel, SIFTChannel, SobelChannel, TcorrChannel, and VarianceChannel.

Definition at line 252 of file SingleChannel.C.

References GVX_TRACE, Image< T >::initialized(), and rutz::shared_ptr< T >::is_valid().

void SingleChannel::paramChanged ModelParamBase *const   param,
const bool  valueChanged,
ParamClient::ChangeStatus status
[virtual]
 

Overload so that we can reconfigure when our params get changed.

Reimplemented from ModelComponent.

Definition at line 183 of file SingleChannel.C.

References OModelParam< T >::getVal(), GVX_TRACE, itsSubmapAlgoType, SubmapAlgorithm::make(), MC_RECURSE, ModelComponent::paramChanged(), and setSubmapAlgorithm().

Image< float > SingleChannel::postProcessMap const Image< float > &  smap,
const uint  idx
const
 

rescale and post-process raw CS map; part of default getSubMap()

Definition at line 448 of file SingleChannel.C.

References downSize(), getMapDims(), getMinMax(), NModelParam< T >::getVal(), OModelParam< T >::getVal(), Image< T >::getWidth(), GVX_TRACE, LevelSpec::indexToCS(), inplaceAddBGnoise(), itsLevelSpec, itsNormType, itsScaleNoiseToMax, itsUseOlderVersion, itsUseRandom, LDEBUG, maxNormalize(), MAXNORMMAX, MAXNORMMIN, maxNormTypeName(), MYLOGVERB, rescale(), ModelComponent::tagName(), and Dims::w().

Referenced by SingleChannelSurprise< SMODEL >::compute(), and SubmapAlgorithmStd::compute().

const ImageSet< float > & SingleChannel::pyramid const uint  index  )  const
 

Access to the underlying pyramid is provided for completeness.

However, it probably shouldn't need to be used except for testing, debugging, etc. Instead, the Channel interface should be used or extended to fill the specific need.

Parameters:
index The index in the queue (0 = newest, qlen-1 = oldest).

Definition at line 774 of file SingleChannel.C.

References ASSERT, CLFATAL, and GVX_TRACE.

Referenced by SingleOpponentChannel::centerSurround(), SingleOpponentChannel::getFeatures(), SingleOpponentChannel::getFeaturesBatch(), and JetFiller::visitSingleChannel().

SimTime SingleChannel::pyramidTime const uint  index  )  const
 

Access to the underlying pyramid times is provided for completeness.

However, it probably shouldn't need to be used except for testing, debugging, etc. Instead, the Channel interface should be used or extended to fill the specific need.

Parameters:
index The index in the queue (0 = newest, qlen-1 = oldest).

Definition at line 783 of file SingleChannel.C.

References ASSERT, GVX_TRACE, and SimTime::ZERO().

Referenced by SingleOpponentChannel::centerSurround().

ImageSet< float > & SingleChannel::pyrMut const uint  index  )  [protected]
 

Mutable access to underlying pyramid.

Definition at line 1007 of file SingleChannel.C.

References ASSERT, and GVX_TRACE.

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

Read params from the ParamMap.

Reimplemented from ChannelBase.

Reimplemented in GaborChannel.

Definition at line 202 of file SingleChannel.C.

References GVX_TRACE, ChannelFacetMap::readFacetsFrom(), and ChannelBase::readFrom().

Referenced by GaborChannel::readFrom().

void SingleChannel::reset1  )  [virtual]
 

Reset SingleChannel.

See the base function in ModelComponent.H for info.

Reimplemented from ChannelBase.

Reimplemented in FlickerChannel, and SingleOpponentChannel.

Definition at line 163 of file SingleChannel.C.

References ImageSet< T >::clear(), GVX_TRACE, rutz::shared_ptr< T >::reset(), and ChannelBase::reset1().

Referenced by SingleOpponentChannel::reset1(), and FlickerChannel::reset1().

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

Save our various maps using an FrameOstream.

Depending on our ModelParam settings, we can save raw pyramid levels (with name prefix "SR<tagname>-<level>-"), center-surround feature maps ("SF<tagname>-<ctr>-<surr>-"), and output map ("SO<tagname>-")

Reimplemented from ChannelBase.

Definition at line 1023 of file SingleChannel.C.

References FLOAT_NORM_0_255, getOutput(), getSubmap(), OModelParam< T >::getVal(), GVX_TRACE, i, LevelSpec::indexToCS(), itsLevelSpec, itsSaveFeatureMaps, itsSaveOutputMap, itsSaveRawMaps, numSubmaps(), sformat(), ImageSet< T >::size(), SRC_POS, and ModelComponent::tagName().

void SingleChannel::saveStats const Image< float >  img,
const short  idx
 

save basic stats for single channel

Definition at line 893 of file SingleChannel.C.

References Image< T >::begin(), FFTWWrapper::compute(), ModelComponent::descriptiveName(), Image< T >::end(), fileName, Image< T >::getHeight(), getMinMaxAvgEtc(), OModelParam< T >::getVal(), Image< T >::getWidth(), i, FFTWWrapper::init(), itsGetSingleChannelStatsFile, itsGetSingleChannelStatsTag, itsSaveStatsPerChannel, itsSaveStatsPerChannelFreq, rutz::max(), rutz::min(), N, and ModelComponent::tagName().

Referenced by combineSubMaps().

void SingleChannel::setBiasMask Image< float > &  biasMask  ) 
 

Set the mask that will be applied to the submap.

Definition at line 229 of file SingleChannel.C.

References GVX_TRACE, and killCaches().

Referenced by MaskBiaser::visitSingleChannel().

void SingleChannel::setClipPyramid const Image< byte > &  clipMask  ) 
 

make the clipping pyramid from the clip mask

Definition at line 711 of file SingleChannel.C.

References buildPyrGaussian(), ImageSet< T >::clear(), doLowThresh(), OModelParam< T >::getVal(), GVX_TRACE, Image< T >::initialized(), itsLevelSpec, and LevelSpec::maxDepth().

Referenced by doInput(), RGBConvolveChannel::doInput(), MSTChannel::doInput(), JunctionChannel::doInput(), inputPyramid(), InputHandlerThreaded::Job::run(), and SingleOpponentChannel::singleOpponentInput().

void SingleChannel::setInputHandler rutz::shared_ptr< InputHandler h  ) 
 

Install an input handler.

Definition at line 1069 of file SingleChannel.C.

References InputHandler::clone(), and GVX_TRACE.

void SingleChannel::setPyramid rutz::shared_ptr< PyrBuilder< float > >  pyr  )  [protected]
 

Change to use a different pyramid object.

Definition at line 998 of file SingleChannel.C.

References ASSERT, and GVX_TRACE.

Referenced by GaborChannel::resetPyramid(), ConvolveChannel::setFilter(), and RGBConvolveChannel::setFilters().

void SingleChannel::setSubmapAlgorithm nub::ref< SubmapAlgorithm algo  ) 
 

Install a new submap algorithm.

Definition at line 1083 of file SingleChannel.C.

References ModelComponent::addSubComponent(), GVX_TRACE, and ModelComponent::removeSubComponent().

Referenced by paramChanged(), and BayesianBiaser::visitSingleChannel().

void SingleChannel::setTempl const uint  cntr,
const uint  surr,
Image< float > &  templ
 

Set the template that will be applied to the submap.

Definition at line 220 of file SingleChannel.C.

References csToIndex(), GVX_TRACE, and killCaches().

void SingleChannel::start1  )  [protected, virtual]
 

If you overload this, make sure you call SingleChannel::start1() at the beginning of your overload

Reimplemented from ModelComponent.

Reimplemented in DisparityChannel, GaborChannel, PedestrianChannel, and TemplateMatchChannel.

Definition at line 128 of file SingleChannel.C.

References OModelParam< T >::getVal(), GVX_TRACE, itsLevelSpec, itsNormType, itsOutputRangeMax, itsOutputRangeMin, itsUseOlderVersion, LevelSpec::maxIndex(), OModelParam< T >::setVal(), and VCXNORM_MAXNORM.

Referenced by TemplateMatchChannel::start1(), GaborChannel::start1(), and DisparityChannel::start1().

void SingleChannel::stop2  )  [protected, virtual]
 

If you overload this, make sure you call SingleChannel::start1() at the beginning of your overload

Reimplemented from ModelComponent.

Definition at line 156 of file SingleChannel.C.

References GVX_TRACE.

void SingleChannel::storeClipPyramid const ImageSet< float > &  p  ) 
 

Store p as the channel's clip pyramid.

Definition at line 726 of file SingleChannel.C.

References GVX_TRACE.

Referenced by SingleChannelBeo::waitForOutput().

void SingleChannel::storeOutputCache const Image< float > &  m  ) 
 

Store m as the output map.

Definition at line 704 of file SingleChannel.C.

References GVX_TRACE.

Referenced by InputHandlerThreaded::Job::run(), and SingleChannelBeo::waitForOutput().

void SingleChannel::storePyramid const ImageSet< float > &  p,
const SimTime t
 

Stores p as the channel's pyramid at time t.

Definition at line 733 of file SingleChannel.C.

References ASSERT, CLFATAL, getMaxPyrLevel(), getMinPyrLevel(), OModelParam< T >::getVal(), GVX_TRACE, isDyadic(), and itsQlen.

Referenced by doInput(), RGBConvolveChannel::doInput(), MSTChannel::doInput(), JunctionChannel::doInput(), DisparityChannel::doInput(), inputPyramid(), InputHandlerThreaded::Job::run(), SingleOpponentChannel::singleOpponentInput(), DisparityChannel::storePyramid(), and SingleChannelBeo::waitForOutput().

void SingleChannel::storeSubmapCache const ImageSet< float > &  p  ) 
 

Store p as the channel's submap cache.

Definition at line 757 of file SingleChannel.C.

References ASSERT, GVX_TRACE, i, numSubmaps(), and ImageSet< T >::size().

Referenced by SingleChannelBeo::waitForOutput().

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

Write params to the ParamMap.

Reimplemented from ChannelBase.

Reimplemented in GaborChannel.

Definition at line 211 of file SingleChannel.C.

References GVX_TRACE, ChannelFacetMap::writeFacetsTo(), and ChannelBase::writeTo().

Referenced by SingleChannelBeo::handleInput(), and GaborChannel::writeTo().


Member Data Documentation

OModelParam<bool> SingleChannel::itsComputeFullPyramidForGist [protected]
 

save our raw pyramid levels for the gist computation?

Definition at line 280 of file SingleChannel.H.

Referenced by getMinPyrLevel().

OModelParam<bool> SingleChannel::itsGetSingleChannelStats [protected]
 

Save basic single channel stats after combineSubMaps.

Definition at line 292 of file SingleChannel.H.

Referenced by combineSubMaps().

OModelParam<std::string> SingleChannel::itsGetSingleChannelStatsFile [protected]
 

File name for single channel stats after combineSubMaps.

Definition at line 301 of file SingleChannel.H.

Referenced by saveStats().

OModelParam<std::string> SingleChannel::itsGetSingleChannelStatsTag [protected]
 

Tag name for single channel stats after combineSubMaps.

Definition at line 304 of file SingleChannel.H.

Referenced by saveStats().

OModelParam<float> SingleChannel::itsOutputRangeMin [protected]
 

Set a fixed range of values for the raw output.

By default, the range is set to [MAXNORMMIN .. MAXNORMMAX] at construction. If non-zero values are provided here, in getOutput() we will cumulate our various submaps, apply the provided range, apply spatial competition for salience, apply our total weight, and return the result. If a range [0.0 .. 0.0] is provided here, only spatial competition and weights will be applied, but the first step of applying the range will be skipped. This must be called before start().

Definition at line 315 of file SingleChannel.H.

Referenced by combineSubMaps(), HueChannel::combineSubMaps(), and start1().

OModelParam<bool> SingleChannel::itsSaveFeatureMaps [protected]
 

Save our center-surround feature maps?

Definition at line 283 of file SingleChannel.H.

Referenced by saveResults().

OModelParam<bool> SingleChannel::itsSaveOutputMap [protected]
 

Save our output map?

Definition at line 286 of file SingleChannel.H.

Referenced by saveResults().

OModelParam<bool> SingleChannel::itsSaveRawMaps [protected]
 

Save our raw pyramid levels?

Definition at line 277 of file SingleChannel.H.

Referenced by RGBConvolveChannel::computePyramid(), getMinPyrLevel(), and saveResults().

OModelParam<bool> SingleChannel::itsSaveStatsPerChannel [protected]
 

If saving stats, should we put each feature in its own file?

Definition at line 295 of file SingleChannel.H.

Referenced by saveStats().

OModelParam<bool> SingleChannel::itsSaveStatsPerChannelFreq [protected]
 

Should we save frequency information per channel?

Definition at line 298 of file SingleChannel.H.

Referenced by saveStats().

OModelParam<std::string> SingleChannel::itsSubmapAlgoType [protected]
 

Type name for our SubmapAlgorithm.

Definition at line 289 of file SingleChannel.H.

Referenced by paramChanged(), and SingleChannel().

OModelParam<double> SingleChannel::itsTimeDecay [protected]
 

Time decay for the contribution of differences in the pyramid queue.

This decay will yield a factor fac = exp( (t2 - t) * decay) applied to the difference image between t (current time, in seconds) and t2 (time of previous image, in seconds):

Definition at line 274 of file SingleChannel.H.

Referenced by SingleOpponentChannel::centerSurround(), and centerSurround().


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