A composite channel containing a set of orientation-tuned gabor channels. More...
#include <Channels/OrientationChannel.H>
Public Types | |
enum | InteractType { NONE = 0, SUB_MEAN = 1, CUSTOM = 2 } |
the possible interaction types between orientations More... | |
Public Member Functions | |
OrientationChannel (OptionManager &mgr) | |
Construct with standard params. | |
OrientationChannel (OptionManager &mgr, const char *tag, const char *desc, const char *gabortag) | |
Construct with standard params and tag override. | |
virtual | ~OrientationChannel () |
Destructor. | |
virtual GaborChannel & | gabor (const uint idx) const |
Wraps ComplexChannel's subChan() and casts the result to GaborChannel. | |
virtual void | paramChanged (ModelParamBase *const param, const bool valueChanged, ParamClient::ChangeStatus *status) |
Overload so that we can reconfigure when our params get changed. | |
InteractType | getInteractType () |
returns the currently set interaction type between the orientation | |
void | setInteractType (InteractType type) |
sets the interaction type between the orientations | |
std::vector< float > | getInteractCoeffs () |
returns the coefficients vector for interactions between orientations | |
void | setInteractCoeffs (std::vector< float > &coeffs) |
sets the coefficients vector for the interactions between orientations | |
virtual Image< float > | getOutput () |
compute interactions, then call ComplexChannel::getOutput() | |
Protected Member Functions | |
void | doInteractions () |
trigger the interaction computation between the gabor filters | |
virtual void | buildSubChans () |
(re-)build our subchannels | |
virtual void | parseInteractString (const std::string &value) |
parse the string for the interaction type between orientations | |
virtual void | doInput (const InputFrame &inframe) |
OrientationChannel requires only luminance input. | |
Protected Attributes | |
OModelParam< uint > | itsNumOrients |
number of Gabor subchannels | |
OModelParam< std::string > | itsInteractString |
type of interaction mode between orientations |
A composite channel containing a set of orientation-tuned gabor channels.
This is an example of a homogeneous complex channel. Thus, the JetSpec representation will have an index for the subchannel number, and further indices for the various Jet components (which are identical for all subchannels).
Definition at line 52 of file OrientationChannel.H.
the possible interaction types between orientations
Definition at line 73 of file OrientationChannel.H.
OrientationChannel::OrientationChannel | ( | OptionManager & | mgr | ) |
Construct with standard params.
Definition at line 60 of file OrientationChannel.C.
References buildSubChans().
OrientationChannel::OrientationChannel | ( | OptionManager & | mgr, | |
const char * | tag, | |||
const char * | desc, | |||
const char * | gabortag | |||
) |
Construct with standard params and tag override.
Definition at line 75 of file OrientationChannel.C.
References buildSubChans(), ModelComponent::setDescriptiveName(), ModelComponent::setTagName(), and sformat().
OrientationChannel::~OrientationChannel | ( | ) | [virtual] |
Destructor.
Definition at line 226 of file OrientationChannel.C.
void OrientationChannel::buildSubChans | ( | ) | [protected, virtual] |
(re-)build our subchannels
Definition at line 96 of file OrientationChannel.C.
References ComplexChannel::addSubChan(), ModelComponent::getManager(), OModelParam< T >::getVal(), itsNumOrients, makeSharedComp(), MC_RECURSE, and ComplexChannel::removeAllSubChans().
Referenced by OrientationChannel(), and paramChanged().
void OrientationChannel::doInput | ( | const InputFrame & | inframe | ) | [protected, virtual] |
OrientationChannel requires only luminance input.
Implements ChannelBase.
Definition at line 241 of file OrientationChannel.C.
References ASSERT, buildPyrLaplacian(), gabor(), rutz::shared_ptr< T >::get(), Image< T >::initialized(), ChannelBase::input(), and ComplexChannel::numChans().
void OrientationChannel::doInteractions | ( | ) | [protected] |
trigger the interaction computation between the gabor filters
Definition at line 270 of file OrientationChannel.C.
References ASSERT, clampedDiff(), doLowThresh(), gabor(), SingleChannel::getOutput(), OModelParam< T >::getVal(), ImageSet< T >::isEmpty(), itsInteractString, mean(), and ComplexChannel::numChans().
Referenced by getOutput().
GaborChannel & OrientationChannel::gabor | ( | const uint | idx | ) | const [virtual] |
Wraps ComplexChannel's subChan() and casts the result to GaborChannel.
Definition at line 232 of file OrientationChannel.C.
References ComplexChannel::subChan().
Referenced by doInput(), and doInteractions().
std::vector< float > OrientationChannel::getInteractCoeffs | ( | ) |
returns the coefficients vector for interactions between orientations
Definition at line 389 of file OrientationChannel.C.
OrientationChannel::InteractType OrientationChannel::getInteractType | ( | ) |
returns the currently set interaction type between the orientation
Definition at line 375 of file OrientationChannel.C.
Image< float > OrientationChannel::getOutput | ( | ) | [virtual] |
compute interactions, then call ComplexChannel::getOutput()
Reimplemented from ComplexChannel.
Definition at line 363 of file OrientationChannel.C.
References doInteractions().
void OrientationChannel::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 207 of file OrientationChannel.C.
References buildSubChans(), OModelParam< T >::getVal(), itsInteractString, itsNumOrients, ComplexChannel::numChans(), and parseInteractString().
void OrientationChannel::parseInteractString | ( | const std::string & | value | ) | [protected, virtual] |
parse the string for the interaction type between orientations
Definition at line 144 of file OrientationChannel.C.
Referenced by paramChanged().
void OrientationChannel::setInteractCoeffs | ( | std::vector< float > & | coeffs | ) |
sets the coefficients vector for the interactions between orientations
Definition at line 396 of file OrientationChannel.C.
void OrientationChannel::setInteractType | ( | OrientationChannel::InteractType | type | ) |
sets the interaction type between the orientations
Definition at line 382 of file OrientationChannel.C.
OModelParam<std::string> OrientationChannel::itsInteractString [protected] |
type of interaction mode between orientations
Definition at line 106 of file OrientationChannel.H.
Referenced by doInteractions(), and paramChanged().
OModelParam<uint> OrientationChannel::itsNumOrients [protected] |
number of Gabor subchannels
Definition at line 94 of file OrientationChannel.H.
Referenced by buildSubChans(), and paramChanged().