
#include <Channels/DirectFeedChannel.H>
Inheritance diagram for DirectFeedChannel:


Definition at line 49 of file DirectFeedChannel.H.
Public Member Functions | |
| DirectFeedChannel (OptionManager &mgr, int id=-1) | |
| Constructor. | |
| virtual | ~DirectFeedChannel () |
| Destructor. | |
| virtual void | reset1 () |
| Reset SingleChannel. | |
| virtual void | readFrom (const ParamMap &pmap) |
| Read params from the ParamMap. | |
| virtual void | writeTo (ParamMap &pmap) const |
| Write params to the ParamMap. | |
| void | clampCoeffs (const double cmin, const double cmax) |
| Clamp the weighting coefficients to the specified range. | |
| double | absSumCoeffs () const |
| Return the sum of the absolute values of the weighting coefficients. | |
| void | setCoeff (const uint idx, const double val) |
| set coefficient idx to val | |
| double | getCoeff (const uint idx) const |
| returns coefficient idx | |
| void | normalizeCoeffs (const double div) |
| Normalize the weighting coefficients by dividing by div. | |
| void | initializeCoeffs (const uint numCoeffs, const double val=1.0) |
| initialize the coefficients to value val | |
| virtual bool | outputAvailable () const |
| Query whether the channel is ready to give yield valid output. | |
| 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 () |
| The output will be the size of the feature map level in the pyramid. | |
| virtual void | killCaches () |
| erase all internal caches | |
| void | inputPyramid (const ImageSet< float > &pyramid, const SimTime &t) |
| Send an already computed pyramid as input to the channel. | |
Protected Member Functions | |
| virtual void | start1 () |
| This is called from within start() before the subcomponents start. | |
| virtual void | doInput (const InputFrame &inframe) |
| the actual input routine | |
| virtual void | computeOutput () |
| computed the output of the channel | |
| virtual Image< float > | applyMaxNorm (Image< float > &map) |
| applies the max norm to map depending on itsNormType | |
Protected Attributes | |
| OModelParam< uint > | itsMapLevel |
| the level at which the saliency map lives | |
| OModelParam< MaxNormType > | itsNormType |
| the kind of normalization to be applied | |
| OModelParam< bool > | itsUseOlderVersion |
| OModelParam< float > | itsOutputRangeMin |
| OModelParam< float > | itsOutputRangeMax |
|
||||||||||||
|
Constructor.
Definition at line 49 of file DirectFeedChannel.C. References name, ModelComponent::setDescriptiveName(), ModelComponent::setTagName(), and toStr(). |
|
|
Destructor.
Definition at line 67 of file DirectFeedChannel.C. |
|
|
Return the sum of the absolute values of the weighting coefficients.
Definition at line 128 of file DirectFeedChannel.C. |
|
|
applies the max norm to map depending on itsNormType
Definition at line 267 of file DirectFeedChannel.C. References ASSERT, OModelParam< T >::getVal(), Image< T >::initialized(), itsNormType, itsOutputRangeMax, itsOutputRangeMin, and maxNormalize(). Referenced by computeOutput(). |
|
||||||||||||
|
Clamp the weighting coefficients to the specified range.
Definition at line 120 of file DirectFeedChannel.C. References clampValue(), i, and killCaches(). |
|
|
computed the output of the channel
Definition at line 251 of file DirectFeedChannel.C. References applyMaxNorm(), ASSERT, getMapDims(), i, output(), rescale(), ImageSet< T >::size(), and ZEROS. Referenced by getOutput(). |
|
|
the actual input routine Only colimg or bwimg ar needed to obtain the dimensions. After each call of doinput, inputPyramid must be called. Implements ChannelBase. Definition at line 181 of file DirectFeedChannel.C. References InputFrame::colorFloat(), OModelParam< T >::getVal(), InputFrame::grayFloat(), Image< T >::initialized(), itsMapLevel, LDEBUG, LFATAL, LINFO, SimTime::msecs(), InputFrame::time(), and toStr(). |
|
|
returns coefficient idx
Definition at line 155 of file DirectFeedChannel.C. References ASSERT, and numSubmaps(). |
|
||||||||||||
|
not implemented
Implements ChannelBase. Definition at line 234 of file DirectFeedChannel.C. References LFATAL. |
|
||||||||||||||||
|
not implemented
Implements ChannelBase. |
|
|
Return the dimensions of the output image.
Implements ChannelBase. Definition at line 212 of file DirectFeedChannel.C. Referenced by computeOutput(). |
|
|
The output will be the size of the feature map level in the pyramid. (I.e., the size of the output is given by getMapDims(). Implements ChannelBase. Definition at line 242 of file DirectFeedChannel.C. References ASSERT, computeOutput(), and Image< T >::initialized(). Referenced by MultiDirectFeedChannel::combineOutputs(). |
|
|
Get 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. Implements ChannelBase. Definition at line 220 of file DirectFeedChannel.C. References ASSERT, and numSubmaps(). |
|
|
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. Definition at line 227 of file DirectFeedChannel.C. References ASSERT, ModelComponent::descriptiveName(), numSubmaps(), and sformat(). |
|
||||||||||||
|
initialize the coefficients to value val
Definition at line 162 of file DirectFeedChannel.C. Referenced by inputPyramid(), and setCoeff(). |
|
||||||||||||
|
Send an already computed pyramid as input to the channel. Must be called after each call of input. Definition at line 169 of file DirectFeedChannel.C. References ASSERT, initializeCoeffs(), LDEBUG, SimTime::msecs(), and ImageSet< T >::size(). Referenced by MultiDirectFeedChannel::inputPyramid(). |
|
|
erase all internal caches
Reimplemented from ChannelBase. Definition at line 277 of file DirectFeedChannel.C. References Image< T >::freeMem(), and SimTime::SECS(). Referenced by clampCoeffs(), normalizeCoeffs(), and setCoeff(). |
|
|
Normalize the weighting coefficients by dividing by div.
Definition at line 137 of file DirectFeedChannel.C. References i, and killCaches(). |
|
|
Return the number of feature maps represented by this channel.
Implements ChannelBase. Definition at line 216 of file DirectFeedChannel.C. References ImageSet< T >::size(). Referenced by getCoeff(), getSubmap(), getSubmapName(), and setCoeff(). |
|
|
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. Definition at line 204 of file DirectFeedChannel.C. References LDEBUG, and SimTime::msecs(). |
|
|
Read params from the ParamMap.
Reimplemented from ChannelBase. Definition at line 106 of file DirectFeedChannel.C. References ChannelBase::readFrom(). |
|
|
Reset SingleChannel. See the base function in ModelComponent.H for info. Reimplemented from ChannelBase. Definition at line 93 of file DirectFeedChannel.C. References Image< T >::freeMem(), ImageSet< T >::reset(), ChannelBase::reset1(), SimTime::SECS(), and SimTime::ZERO(). |
|
||||||||||||
|
set coefficient idx to val
Definition at line 145 of file DirectFeedChannel.C. References ASSERT, initializeCoeffs(), ImageSet< T >::isEmpty(), killCaches(), and numSubmaps(). |
|
|
This is called from within start() before the subcomponents start.
Reimplemented from ModelComponent. Definition at line 71 of file DirectFeedChannel.C. References OModelParam< T >::getVal(), itsNormType, itsOutputRangeMax, itsOutputRangeMin, itsUseOlderVersion, OModelParam< T >::setVal(), and VCXNORM_MAXNORM. |
|
|
Write params to the ParamMap.
Reimplemented from ChannelBase. Definition at line 113 of file DirectFeedChannel.C. References ChannelBase::writeTo(). |
|
|
the level at which the saliency map lives
Definition at line 149 of file DirectFeedChannel.H. Referenced by doInput(). |
|
|
the kind of normalization to be applied
Definition at line 152 of file DirectFeedChannel.H. Referenced by applyMaxNorm(), and start1(). |
1.4.4