EnvVisualCortexBase Class Reference

Base class for a VisualCortex using the fast envision saliency computations. More...

#include <Neuro/EnvVisualCortex.H>

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

List of all members.

Public Member Functions

 EnvVisualCortexBase (OptionManager &mgr, const std::string &descrName="EnvVisualCortexBase", const std::string &tagName="EnvVisualCortexBase")
 Constructor.
virtual ~EnvVisualCortexBase ()
 virtual destructor for safe inheritance
env_size_t getMapLevel () const
 Return the pyramid level of the saliency map.
virtual void input (const Image< PixRGB< byte > > &rgbin)=0
 Compute saliency map from an input image.
byte getIweight ()
byte getCweight ()
byte getOweight ()
byte getFweight ()
byte getMweight ()
struct env_paramsgetParams () const
 Access our internal envision parameters.
bool getColorSmoothing () const
void setColorSmoothing (bool val)
void setIweight (byte val)
void setCweight (byte val)
void setOweight (byte val)
void setNumOrientations (byte val)
void setFweight (byte val)
void setMweight (byte val)
void setFthresh (byte val)
void setMthresh (byte val)
void setMultiScaleFlicker (bool val)
void setNumDirections (byte val)
void setSubmapPreProc (int(*submapPreProc)(const char *tagName, env_size_t clev, env_size_t slev, struct env_image *submap, const struct env_image *center, const struct env_image *surround))
void setSubmapPostNormProc (int(*submapPostNormProc)(const char *tagName, env_size_t clev, env_size_t slev, struct env_image *submap, const struct env_image *center, const struct env_image *surround))
void setSubmapPostProc (int(*submapPostProc)(const char *tagName, struct env_image *cmap))

Protected Member Functions

virtual void paramChanged (ModelParamBase *const param, const bool valueChanged, ParamClient::ChangeStatus *status)
 Called whenever a ModelParamBase has its value changed.
virtual void start1 ()
 This is called from within start() before the subcomponents start.
virtual void stop2 ()
 This is called from within stop() after the subcomponents have stopped.

Protected Attributes

NModelParam< byteitsIweight
NModelParam< byteitsCweight
NModelParam< byteitsOweight
NModelParam< byteitsFweight
NModelParam< byteitsMweight
OModelParam< bool > itsMultithreaded
OModelParam< std::stringitsMaxnormType
OModelParam< byteitsScaleBits
OModelParam< byteitsNumOrientations
OModelParam< bool > itsColorSmoothing
OModelParam< byteitsNumDirections
OModelParam< byteitsMotionThresh
OModelParam< byteitsFlickerThresh
OModelParam< int > itsRangeThresh
OModelParam< bool > itsMultiScaleFlicker
OModelParam< bool > itsShowMemStats
OModelParam< LevelSpecitsLevelSpec
OModelParam< std::stringitsType
struct env_params envp
struct env_visual_cortex ivc
env_size_t npixels
int framenum
Image< PixRGB< byte > > itsPrevRgb
rutz::shared_ptr
< WorkThreadServer
itsThreadServer

Detailed Description

Base class for a VisualCortex using the fast envision saliency computations.

Definition at line 69 of file EnvVisualCortex.H.


Constructor & Destructor Documentation

EnvVisualCortexBase::EnvVisualCortexBase ( OptionManager mgr,
const std::string descrName = "EnvVisualCortexBase",
const std::string tagName = "EnvVisualCortexBase" 
)

Constructor.

Definition at line 243 of file EnvVisualCortex.C.

EnvVisualCortexBase::~EnvVisualCortexBase (  )  [virtual]

virtual destructor for safe inheritance

Definition at line 273 of file EnvVisualCortex.C.

References env_allocation_cleanup(), and rutz::shared_ptr< T >::reset().


Member Function Documentation

env_size_t EnvVisualCortexBase::getMapLevel (  )  const [inline]

Return the pyramid level of the saliency map.

Definition at line 253 of file EnvVisualCortex.H.

References env_params::output_map_level.

struct env_params & EnvVisualCortexBase::getParams (  )  const [read]

Access our internal envision parameters.

Definition at line 261 of file EnvVisualCortex.H.

virtual void EnvVisualCortexBase::input ( const Image< PixRGB< byte > > &  rgbin  )  [pure virtual]

Compute saliency map from an input image.

Use the getVCXmap(), getImap(), etc to get the results. In the base class input() is pure virtual and the getVCXmap() and others do not exist. Derived classes implement all these and you should use these derived classes.

Implemented in EnvVisualCortex, and EnvVisualCortexFloat.

void EnvVisualCortexBase::paramChanged ( ModelParamBase *const   param,
const bool  valueChanged,
ParamClient::ChangeStatus status 
) [protected, virtual]

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.

Parameters:
param the address of the ModelParamBase that changed; subclasses can compare this with the addresses of their model param members to figure out which is the relevant param
valueChanged true if the value actually changed, false if the value was "set" but the new value is the same as the old value; some clients may want to avoid re-doing expensive operations if the value did not actually change
status the subclass that implements paramChanged() should set *status to CHANGE_REJECTED if it wishes to reject a particular parameter change; the caller of paramChanged() is expected to set *status to CHANGE_ACCEPTED prior to calling paramChanged(), so the implentation of paramChanged() does not need to set *status CHANGE_ACCEPTED if it wishes to allow the change since that will already be the default status

HISTORICAL NOTE: In the past, subclasses would override setModelParamString() for this same purpose, but in the new setup, setModelParamString() is NOT virtual and hence should not be (cannot be) overridden by subclasses. This setup is cleaner (and potentially more efficient) because subclasses don't have to compare string names to figure out which param changed; instead they are passed the address of the param itself. Furthermore, the new setup is more robust, since we can handle param value changes that come from any source (e.g., setModelParamVal(), or ModelParamBase::setValString(), or OModelParam::setVal()), and not just those that come through setModelParamString().

Reimplemented from ModelComponent.

Definition at line 333 of file EnvVisualCortex.C.

References env_init_pthread_alloc(), ENV_VCXNORM_MAXNORM, ENV_VCXNORM_NONE, rutz::shared_ptr< T >::get(), ModelParamBase::getName(), OModelParam< T >::getVal(), NModelParam< T >::getVal(), env_params::num_orientations, rutz::shared_ptr< T >::reset(), and ModelComponent::started().

void EnvVisualCortexBase::start1 (  )  [protected, virtual]
void EnvVisualCortexBase::stop2 (  )  [protected, virtual]

This is called from within stop() after the subcomponents have stopped.

Reimplemented from ModelComponent.

Definition at line 319 of file EnvVisualCortex.C.

References env_allocation_get_stats(), OModelParam< T >::getVal(), and invt_allocation_show_stats().


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