SingleChannel represents a single stream of processing. More...
#include <Channels/SingleChannel.H>
Classes | |
struct | TPyr |
a time-stamped pyramid More... | |
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 |
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 |
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. | |
virtual 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. | |
virtual 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. | |
virtual 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< InputHandler > | cloneInputHandler () 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) |
virtual int | getMinPyrLevel () const |
virtual 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 () |
virtual uint | csToIndex (uint centerlev, uint surroundlev) const |
virtual void | indexToCS (const uint index, uint ¢erlev, uint &surroundlev) const |
virtual uint | maxIndex () 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< LevelSpec > | itsLevelSpec |
OModelParam< MaxNormType > | itsNormType |
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::string > | itsSubmapAlgoType |
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::string > | itsGetSingleChannelStatsFile |
File name for single channel stats after combineSubMaps. | |
OModelParam< std::string > | itsGetSingleChannelStatsTag |
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 |
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.
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.
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(), OModelParam< T >::getVal(), rutz::factory< nub::ref< P > >::is_valid_key(), and itsSubmapAlgoType.
SingleChannel::~SingleChannel | ( | ) | [virtual] |
destructor
Definition at line 122 of file SingleChannel.C.
void SingleChannel::accept | ( | ChannelVisitor & | v | ) | [virtual] |
Calls visitSingleChannel() on the ChannelVisitor.
Reimplemented from ChannelBase.
Definition at line 176 of file SingleChannel.C.
References 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(), LevelSpec::csOK(), exp(), OModelParam< T >::getVal(), and itsTimeDecay.
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(), LevelSpec::csOK(), exp(), OModelParam< T >::getVal(), NModelParam< T >::getVal(), and itsTimeDecay.
Referenced by centerSurround(), and getRawCSmap().
const ImageSet< float > & SingleChannel::clipPyramid | ( | ) | const |
Access to the underlying clipPyramid.
Definition at line 785 of file SingleChannel.C.
Referenced by SingleOpponentChannel::centerSurround().
rutz::shared_ptr< InputHandler > SingleChannel::cloneInputHandler | ( | ) | const |
Get a cloned copy of our input handler.
Definition at line 1084 of file SingleChannel.C.
References InputHandler::clone().
Image< float > SingleChannel::combineSubMaps | ( | ) | [virtual] |
Combine all feature maps into a single output map.
Reimplemented in HueChannel.
Definition at line 806 of file SingleChannel.C.
References Image< T >::clear(), ModelComponent::descriptiveName(), findMax(), getMapDims(), getMinMax(), getSubmap(), OModelParam< T >::getVal(), NModelParam< T >::getVal(), goodness_map(), inplacePaste(), itsGetSingleChannelStats, itsOutputRangeMin, maxNormalize(), maxNormTypeName(), MYLOGVERB, saveStats(), ModelComponent::tagName(), templMatch(), VCXNORM_LANDMARK, 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, and DirectionSpatioTemporalChannel.
Definition at line 678 of file SingleChannel.C.
References doLowThresh(), doLowThreshAbs(), doRectify(), and NModelParam< T >::getVal().
Referenced by doInput().
void SingleChannel::doInput | ( | const InputFrame & | inframe | ) | [protected, virtual] |
SingleChannel requires only luminance input.
Implements ChannelBase.
Reimplemented in DirectionOpticalFlowChannel, DirectionSpatioTemporalChannel, DisparityChannel, DummyChannel, EntropyChannel, FlickerChannel, FlickerNBackChannel, ForegroundDetectionChannel, HueChannel, InformationChannel, JunctionChannel, MichelsonChannel, MSTChannel, PN03contrastChannel, RGBConvolveChannel, ScorrChannel, SIFTChannel, SobelChannel, TcorrChannel, and VarianceChannel.
Definition at line 639 of file SingleChannel.C.
References ASSERT, computePyramid(), Image< T >::initialized(), rutz::shared_ptr< T >::is_valid(), setClipPyramid(), ModelComponent::started(), and storePyramid().
Image< float > SingleChannel::getBiasMask | ( | ) | const |
Set the mask that will be applied to the submap.
Definition at line 237 of file SingleChannel.C.
Get the image from the given level of the internal pyramid.
Definition at line 288 of file SingleChannel.C.
Referenced by HueChannel::combineSubMaps(), MichelsonChannel::doInput(), and TemplateMatchChannel::findBestMatch().
LevelSpec SingleChannel::getLevelSpec | ( | ) | const [virtual] |
get our the LevelSpec
Definition at line 792 of file SingleChannel.C.
References OModelParam< T >::getVal().
Referenced by StereoChannel::start1(), JetFiller::visitSingleChannel(), OptimalGainsFinder::visitSingleChannel(), JetSpecFiller::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(), and LevelSpec::mapLevel().
Referenced by combineSubMaps(), SubmapAlgorithmBiased::compute(), getOutput(), getRawCSmap(), DirectionSpatioTemporalChannel::getRawCSmap(), postProcessMap(), and OptimalGainsFinder::visitSingleChannel().
int SingleChannel::getNormType | ( | ) | const |
get our NormType:
Definition at line 799 of file SingleChannel.C.
References OModelParam< T >::getVal().
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 964 of file SingleChannel.C.
References combineSubMaps(), getMapDims(), ChannelBase::hasInput(), Image< T >::initialized(), outputAvailable(), ModelComponent::tagName(), and ZEROS.
Referenced by OrientationChannel::doInteractions(), HueChannel::getSubmap(), saveResults(), and OptimalGainsFinder::visitSingleChannel().
get raw CS map; part of getSubmap()
Reimplemented from ChannelBase.
Reimplemented in DirectionSpatioTemporalChannel, and ForegroundDetectionChannel.
Definition at line 378 of file SingleChannel.C.
References ASSERT, binaryReverse(), centerSurround(), getMapDims(), getMinMax(), OModelParam< T >::getVal(), LevelSpec::indexOK(), maxNormalize(), MYLOGVERB, ModelComponent::tagName(), and ZEROS.
Referenced by SubmapAlgorithmStd::compute(), SubmapAlgorithmBiased::compute(), and SingleChannelSurprise< SMODEL >::compute().
This is just a caching wrapper around computeSubmap().
Implements ChannelBase.
Reimplemented in ForegroundDetectionChannel, and HueChannel.
Definition at line 367 of file SingleChannel.C.
Referenced by DescriptorVec::buildParticleCountDV(), DescriptorVec::buildSingleChannelFV(), combineSubMaps(), saveResults(), 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(), LevelSpec::indexOK(), and sformat().
std::string SingleChannel::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 518 of file SingleChannel.C.
References ASSERT, OModelParam< T >::getVal(), LevelSpec::indexOK(), sformat(), and ModelComponent::tagName().
Get the template that is beeing applied to the submap.
Definition at line 244 of file SingleChannel.C.
bool SingleChannel::hasOutputCache | ( | ) | const |
have we already computed and cached the current output?
Definition at line 271 of file SingleChannel.C.
References 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.
Referenced by SingleOpponentChannel::centerSurround().
void SingleChannel::inputPyramid | ( | const ImageSet< float > & | pyramid, | |
const SimTime & | t, | |||
const Image< byte > & | clipMask = Image<byte>() | |||
) |
Send an already computed pyramid as input to the channel.
Definition at line 665 of file SingleChannel.C.
References 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(), and ModelComponent::started().
Referenced by JunctionChannel::doInput(), MSTChannel::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 760 of file SingleChannel.C.
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.
Referenced by DescriptorVec::buildParticleCountDV(), DescriptorVec::buildSingleChannelFV(), saveResults(), storeSubmapCache(), OptimalGainsFinder::visitSingleChannel(), MaskBiaser::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 DirectionOpticalFlowChannel, DummyChannel, EntropyChannel, ForegroundDetectionChannel, InformationChannel, MichelsonChannel, PN03contrastChannel, ScorrChannel, SIFTChannel, SobelChannel, TcorrChannel, and VarianceChannel.
Definition at line 252 of file SingleChannel.C.
References Image< T >::initialized(), and rutz::shared_ptr< T >::is_valid().
Referenced by getOutput().
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(), itsSubmapAlgoType, MC_RECURSE, and setSubmapAlgorithm().
rescale and post-process raw CS map; part of default getSubMap()
Definition at line 448 of file SingleChannel.C.
References downSize(), getMapDims(), getMinMax(), OModelParam< T >::getVal(), NModelParam< T >::getVal(), Image< T >::getWidth(), inplaceAddBGnoise(), maxNormalize(), MAXNORMMAX, MAXNORMMIN, maxNormTypeName(), MYLOGVERB, rescale(), ModelComponent::tagName(), and Dims::w().
Referenced by SubmapAlgorithmStd::compute(), and SingleChannelSurprise< SMODEL >::compute().
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.
index | The index in the queue (0 = newest, qlen-1 = oldest). |
Definition at line 767 of file SingleChannel.C.
References ASSERT.
Referenced by SingleOpponentChannel::centerSurround(), JunctionChannel::doInput(), MSTChannel::doInput(), and JetFiller::visitSingleChannel().
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.
index | The index in the queue (0 = newest, qlen-1 = oldest). |
Definition at line 776 of file SingleChannel.C.
References ASSERT, and SimTime::ZERO().
Referenced by SingleOpponentChannel::centerSurround().
Mutable access to underlying pyramid.
Definition at line 1000 of file SingleChannel.C.
References ASSERT.
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 ChannelFacetMap::readFacetsFrom().
void SingleChannel::reset1 | ( | ) | [virtual] |
Reset SingleChannel.
See the base function in ModelComponent.H for info.
Reimplemented from ChannelBase.
Reimplemented in FlickerChannel, FlickerNBackChannel, and SingleOpponentChannel.
Definition at line 163 of file SingleChannel.C.
References ImageSet< T >::clear(), and rutz::shared_ptr< T >::reset().
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 1031 of file SingleChannel.C.
References ModelComponent::descriptiveName(), FLOAT_NORM_0_255, getOutput(), getSubmap(), OModelParam< T >::getVal(), 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 886 of file SingleChannel.C.
References Image< T >::begin(), ModelComponent::descriptiveName(), Image< T >::end(), Image< T >::getHeight(), getMinMaxAvgEtc(), OModelParam< T >::getVal(), Image< T >::getWidth(), itsGetSingleChannelStatsFile, itsGetSingleChannelStatsTag, itsSaveStatsPerChannel, itsSaveStatsPerChannelFreq, max(), min(), 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 killCaches().
Referenced by MaskBiaser::visitSingleChannel().
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(), Image< T >::initialized(), and LevelSpec::maxDepth().
Referenced by RGBConvolveChannel::doInput(), doInput(), JunctionChannel::doInput(), MSTChannel::doInput(), DirectionSpatioTemporalChannel::doInput(), inputPyramid(), and SingleOpponentChannel::singleOpponentInput().
void SingleChannel::setInputHandler | ( | rutz::shared_ptr< InputHandler > | h | ) |
Install an input handler.
Definition at line 1077 of file SingleChannel.C.
References InputHandler::clone().
void SingleChannel::setPyramid | ( | rutz::shared_ptr< PyrBuilder< float > > | pyr | ) | [protected] |
Change to use a different pyramid object.
Definition at line 991 of file SingleChannel.C.
References ASSERT.
Referenced by ConvolveChannel::setFilter(), RGBConvolveChannel::setFilters(), and GaussianPyrChannel::start1().
void SingleChannel::setSubmapAlgorithm | ( | nub::ref< SubmapAlgorithm > | algo | ) |
Install a new submap algorithm.
Definition at line 1091 of file SingleChannel.C.
References ModelComponent::addSubComponent(), ModelComponent::removeSubComponent(), and ModelComponent::started().
Referenced by paramChanged(), and BayesianBiaser::visitSingleChannel().
Set the template that will be applied to the submap.
Definition at line 220 of file SingleChannel.C.
References 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 DirectionOpticalFlowChannel, DirectionSpatioTemporalChannel, DisparityChannel, GaborChannel, GaussianPyrChannel, PedestrianChannel, and TemplateMatchChannel.
Definition at line 128 of file SingleChannel.C.
References OModelParam< T >::getVal(), itsOutputRangeMin, OModelParam< T >::setVal(), and VCXNORM_MAXNORM.
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.
void SingleChannel::storeClipPyramid | ( | const ImageSet< float > & | p | ) |
Store p as the channel's clip pyramid.
Definition at line 726 of file SingleChannel.C.
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.
Referenced by SingleChannelBeo::waitForOutput().
Stores p as the channel's pyramid at time t.
Definition at line 733 of file SingleChannel.C.
References ASSERT, OModelParam< T >::getVal(), and isDyadic().
Referenced by doInput(), RGBConvolveChannel::doInput(), DisparityChannel::doInput(), JunctionChannel::doInput(), MSTChannel::doInput(), DirectionSpatioTemporalChannel::doInput(), inputPyramid(), SingleOpponentChannel::singleOpponentInput(), and SingleChannelBeo::waitForOutput().
void SingleChannel::storeSubmapCache | ( | const ImageSet< float > & | p | ) |
Store p as the channel's submap cache.
Definition at line 750 of file SingleChannel.C.
References ASSERT, 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 ChannelFacetMap::writeFacetsTo().
Referenced by SingleChannelBeo::handleInput().
OModelParam<bool> SingleChannel::itsComputeFullPyramidForGist [protected] |
save our raw pyramid levels for the gist computation?
Definition at line 280 of file SingleChannel.H.
OModelParam<bool> SingleChannel::itsGetSingleChannelStats [protected] |
Save basic single channel stats after combineSubMaps.
Definition at line 292 of file SingleChannel.H.
Referenced by combineSubMaps().
File name for single channel stats after combineSubMaps.
Definition at line 301 of file SingleChannel.H.
Referenced by saveStats().
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 HueChannel::combineSubMaps(), 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] |
OModelParam<bool> SingleChannel::itsSaveRawMaps [protected] |
Save our raw pyramid levels?
Definition at line 277 of file SingleChannel.H.
Referenced by RGBConvolveChannel::computePyramid(), 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().