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


In brief, RawVisualCortex holds a collection of ChannelBase objects, and most of RawVisualCortex's operations are achieved by some kind of iteration over that collection. That is, RawVisualCortex now does little work by itself, but delegates its operations to the channels, accumulating their results if necessary. NOTE: RawVisualCortex has a virtual ModelComponent base which is shared among its inheritance from ModelComponent via the ComplexChannel inheritance path, and its inheritance from ModelComponent via its SimModule inheritance path. Just beware!
Definition at line 66 of file RawVisualCortex.H.
Public Member Functions | |
| virtual void | saveResults (const nub::ref< FrameOstream > &ofs) |
| Save our results. | |
| const Image< float > | getVCOutput (const Image< PixRGB< byte > > &rgbin) |
| Get the output of the vc map from a given image. | |
Constructors/Destructor | |
| RawVisualCortex (OptionManager &mgr, const std::string &descrName="Raw Visual Cortex", const std::string &tagName="RawVisualCortex") | |
| Construct with no channel; channels must then be added with addSubChan(). | |
| virtual | ~RawVisualCortex () |
| Virtual destructor for safe inheritance. | |
Protected Member Functions | |
| virtual void | doInput (const InputFrame &inframe) |
| Implementation of ChannelBase input() functions. | |
| virtual Image< float > | combineOutputs () |
| Combine the outputs of our subchannels. | |
| virtual Image< float > | getChannelOutputMap (const uint idx) const |
| get weighted (but not resized) channel output map | |
| virtual Image< float > | postProcessOutputMap (const Image< float > &outmap) |
| post-process raw weighted sum of channel output maps | |
| virtual void | paramChanged (ModelParamBase *const param, const bool valueChanged, ParamClient::ChangeStatus *status) |
| Called whenever a ModelParamBase has its value changed. | |
| virtual void | start1 () |
| start | |
| virtual void | stop2 () |
| stop | |
Protected Attributes | |
| OModelParam< std::string > | itsType |
| OModelParam< MaxNormType > | itsNormType |
| maxNormalization to use | |
| OModelParam< bool > | itsUseRandom |
| add random noise to output | |
| OModelParam< float > | itsOutputFactor |
| output range factor | |
| OModelParam< float > | itsNoise |
| output noise range | |
| OModelParam< bool > | itsUseOlderVersion |
| use old version? see Visualcortex.H | |
| OModelParam< LevelSpec > | itsLevelSpec |
| LevelSpec used by our channels, used to compute output dims. | |
| OModelParam< std::string > | itsSaveOutTo |
| save our outputs to MGZ file? | |
| OModelParam< std::string > | itsLoadOutFrom |
| load outputs from MGZ file? | |
| OModelParam< bool > | itsSaveOutput |
| save our output? | |
| OModelParam< bool > | itsUseMax |
| use max across features instead of sum? | |
| OModelParam< float > | itsWeightThresh |
| threshold on channel total weights for last round of maxnorm | |
|
||||||||||||||||
|
Construct with no channel; channels must then be added with addSubChan().
Definition at line 97 of file RawVisualCortex.C. References GVX_TRACE. |
|
|
Virtual destructor for safe inheritance.
Definition at line 120 of file RawVisualCortex.C. References GVX_TRACE. |
|
|
Combine the outputs of our subchannels. We do this in a slightly different way than the ComplexChannel base version. Reimplemented from ComplexChannel. Definition at line 514 of file RawVisualCortex.C. References downSizeClean(), FLOAT_NORM_PRESERVE, getChannelOutputMap(), Image< T >::getDims(), ChannelBase::getInputDims(), getMinMax(), OModelParam< T >::getVal(), GVX_TRACE, Dims::h(), Image< T >::initialized(), inplaceAddBGnoise(), itsLevelSpec, itsLoadOutFrom, itsNoise, itsOutputFactor, itsSaveOutTo, itsUseMax, itsUseRandom, LDEBUG, LINFO, LevelSpec::mapLevel(), MYLOGVERB, ComplexChannel::numChans(), output(), ComplexChannel::outputAvailable(), postProcessOutputMap(), sml, ComplexChannel::subChan(), takeMax(), Dims::w(), and ZEROS. |
|
|
Implementation of ChannelBase input() functions.
Implements ChannelBase. Definition at line 473 of file RawVisualCortex.C. References buildPyrGaussian(), featureHierarchyLevel(), featureHierarchyName(), rutz::shared_ptr< T >::get(), OModelParam< T >::getVal(), InputFrame::grayFloat(), itsLevelSpec, itsLoadOutFrom, LINFO, LevelSpec::maxDepth(), ComplexChannel::numChans(), InputFrame::pyrCache(), and ComplexChannel::subChan(). |
|
|
get weighted (but not resized) channel output map
Definition at line 392 of file RawVisualCortex.C. References getMinMax(), OModelParam< T >::getVal(), itsUseOlderVersion, LDEBUG, MYLOGVERB, ComplexChannel::subChan(), and w. Referenced by combineOutputs(). |
|
|
Get the output of the vc map from a given image.
Definition at line 377 of file RawVisualCortex.C. References InputFrame::fromRgb(), ComplexChannel::getOutput(), ChannelBase::input(), SimTime::MSECS(), and SimTime::ZERO(). |
|
||||||||||||||||
|
Called whenever a ModelParamBase has its value changed. Subclasses of ModelComponent should override this function if they need to do any internal reconfiguration when their parameters change value (whether due to a command-line option, or a setModelParamString(), or a readParamsFrom()). See OrientationChannel::paramChanged() in Channels/OrientationChannel.C for an example; also see SaccadeControllerConfigurator::paramChanged() in Neuro/SaccadeControllers.C for for how to use this to select subcomponents at runtime.
Reimplemented from ModelComponent. Reimplemented in VisualCortexSurprise. Definition at line 196 of file RawVisualCortex.C. References ComplexChannel::addSubChan(), ASSERT, c, ModelComponent::getManager(), OModelParam< T >::getVal(), itsType, LFATAL, LINFO, makeContourChannel(), makeSharedComp(), MC_RECURSE, mgr, ComplexChannel::numChans(), ModelComponent::paramChanged(), ComplexChannel::removeAllSubChans(), s, ComplexChannel::subChan(), w, and ww. Referenced by VisualCortexSurprise::paramChanged(). |
|
|
post-process raw weighted sum of channel output maps Derived classes may overload this to provide custom post-processing. For example, VisualCortexSurprise may pass the output through a sigmoidal nonlinearity or spatial competition. Default implementation is to treat the special case of VCXNORM_LANDMARK. Reimplemented in VisualCortexSurprise. Definition at line 438 of file RawVisualCortex.C. References ComplexChannel::getSubchanTotalWeight(), OModelParam< T >::getVal(), itsNormType, itsWeightThresh, LDEBUG, LFATAL, maxNormalize(), maxNormTypeName(), ComplexChannel::numChans(), VCXNORM_LANDMARK, VCXNORM_NONE, and VCXNORM_SURPRISE. Referenced by combineOutputs(). |
|
|
Save our results.
Reimplemented from ComplexChannel. Definition at line 602 of file RawVisualCortex.C. References FLOAT_NORM_PRESERVE, ComplexChannel::getOutput(), OModelParam< T >::getVal(), GVX_TRACE, itsSaveOutput, ComplexChannel::numChans(), SRC_POS, and ComplexChannel::subChan(). |
|
|
start
Reimplemented from ComplexChannel. Definition at line 163 of file RawVisualCortex.C. References featureHierarchyLevel(), featureHierarchyName(), featureName(), OModelParam< T >::getVal(), GVX_TRACE, itsLoadOutFrom, itsSaveOutTo, LINFO, rutz::make_shared(), ComplexChannel::numChans(), ComplexChannel::start1(), and ComplexChannel::subChan(). |
|
|
stop
Reimplemented from ComplexChannel. Definition at line 186 of file RawVisualCortex.C. References GVX_TRACE, rutz::shared_ptr< T >::is_valid(), and ComplexChannel::stop2(). |
|
|
LevelSpec used by our channels, used to compute output dims.
Definition at line 143 of file RawVisualCortex.H. Referenced by combineOutputs(), and doInput(). |
|
|
load outputs from MGZ file?
Definition at line 146 of file RawVisualCortex.H. Referenced by combineOutputs(), doInput(), and start1(). |
|
|
output noise range
Definition at line 120 of file RawVisualCortex.H. Referenced by combineOutputs(). |
|
|
maxNormalization to use
Reimplemented from ComplexChannel. Definition at line 117 of file RawVisualCortex.H. Referenced by VisualCortexSurprise::postProcessOutputMap(), and postProcessOutputMap(). |
|
|
output range factor
Definition at line 119 of file RawVisualCortex.H. Referenced by combineOutputs(). |
|
|
save our output?
Definition at line 147 of file RawVisualCortex.H. Referenced by saveResults(). |
|
|
save our outputs to MGZ file?
Definition at line 145 of file RawVisualCortex.H. Referenced by combineOutputs(), and start1(). |
|
|
use max across features instead of sum?
Definition at line 148 of file RawVisualCortex.H. Referenced by combineOutputs(), and VisualCortexSurprise::postProcessOutputMap(). |
|
|
use old version? see Visualcortex.H
Reimplemented from ComplexChannel. Definition at line 140 of file RawVisualCortex.H. Referenced by getChannelOutputMap(). |
|
|
add random noise to output
Definition at line 118 of file RawVisualCortex.H. Referenced by combineOutputs(). |
|
|
threshold on channel total weights for last round of maxnorm
Definition at line 149 of file RawVisualCortex.H. Referenced by postProcessOutputMap(). |
1.4.4