#include <Channels/MotionOpticalFlowChannel.H>
Public Member Functions | |
MotionOpticalFlowChannel (OptionManager &mgr) | |
Construct. | |
virtual | ~MotionOpticalFlowChannel () |
destructor | |
virtual DirectionOpticalFlowChannel & | dirChan (const uint idx) const |
returns a specific DirectionOpticalFlowChannel | |
virtual void | paramChanged (ModelParamBase *const param, const bool valueChanged, ParamClient::ChangeStatus *status) |
Overload so that we can reconfigure when our params get changed. | |
virtual Image< float > | getOutput () |
Protected Member Functions | |
virtual void | buildSubChans () |
(re-)build our subchannels | |
virtual void | doInput (const InputFrame &inframe) |
MotionSpatioTemporalChannel only required luminosity input. | |
void | computeConspicuityMap () |
Protected Attributes | |
OModelParam< OpticalFlowType > | itsOpticalFlowType |
OModelParam< uint > | itsNumDirs |
number of DirectionOpticalFlowChannel subcomponents | |
nub::ref< FoeDetector > | itsFoeDetector |
its Focus of Expansion detector | |
Image< byte > | itsCurrentImage |
the current input image | |
Image< byte > | itsPreviousImage |
the previous input image | |
std::vector< nub::ref < DirectionOpticalFlowChannel > > | itsDirectionOpticalFlowChannels |
the various directional sub-channels | |
rutz::shared_ptr< OpticalFlow > | itsOpticalFlow |
stores the optical flow features | |
Image< float > | itsConspicuityMap |
the current conspicuity map | |
rutz::shared_ptr< XWinManaged > | itsWin |
A composite channel containing a set of directional optical flow sub-channels
Definition at line 54 of file MotionOpticalFlowChannel.H.
MotionOpticalFlowChannel::MotionOpticalFlowChannel | ( | OptionManager & | mgr | ) |
Construct.
Definition at line 67 of file MotionOpticalFlowChannel.C.
References buildSubChans(), and rutz::shared_ptr< T >::reset().
MotionOpticalFlowChannel::~MotionOpticalFlowChannel | ( | ) | [virtual] |
destructor
Definition at line 86 of file MotionOpticalFlowChannel.C.
void MotionOpticalFlowChannel::buildSubChans | ( | ) | [protected, virtual] |
(re-)build our subchannels
Definition at line 100 of file MotionOpticalFlowChannel.C.
References ComplexChannel::addSubChan(), ModelComponent::getManager(), OModelParam< T >::getVal(), itsDirectionOpticalFlowChannels, itsNumDirs, itsOpticalFlowType, makeSharedComp(), MC_RECURSE, and ComplexChannel::removeAllSubChans().
Referenced by MotionOpticalFlowChannel(), and paramChanged().
DirectionOpticalFlowChannel & MotionOpticalFlowChannel::dirChan | ( | const uint | idx | ) | const [virtual] |
returns a specific DirectionOpticalFlowChannel
Definition at line 93 of file MotionOpticalFlowChannel.C.
void MotionOpticalFlowChannel::doInput | ( | const InputFrame & | inframe | ) | [protected, virtual] |
MotionSpatioTemporalChannel only required luminosity input.
Implements ChannelBase.
Definition at line 146 of file MotionOpticalFlowChannel.C.
References ASSERT, getLucasKanadeOpticFlow(), image, Image< T >::initialized(), itsCurrentImage, itsDirectionOpticalFlowChannels, itsOpticalFlow, itsPreviousImage, ComplexChannel::numChans(), and ComplexChannel::subChan().
Image< float > MotionOpticalFlowChannel::getOutput | ( | ) | [virtual] |
Form output by combining output of subchannels. Sums the outputs of the subchannels and then optionally maxNormalize()'s the result
Reimplemented from ComplexChannel.
Definition at line 289 of file MotionOpticalFlowChannel.C.
References itsConspicuityMap.
void MotionOpticalFlowChannel::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 131 of file MotionOpticalFlowChannel.C.
References buildSubChans(), OModelParam< T >::getVal(), itsNumDirs, and ComplexChannel::numChans().
Image<float> MotionOpticalFlowChannel::itsConspicuityMap [protected] |
the current conspicuity map
Definition at line 108 of file MotionOpticalFlowChannel.H.
Referenced by getOutput().
Image<byte> MotionOpticalFlowChannel::itsCurrentImage [protected] |
the current input image
Definition at line 95 of file MotionOpticalFlowChannel.H.
Referenced by doInput().
std::vector<nub::ref<DirectionOpticalFlowChannel> > MotionOpticalFlowChannel::itsDirectionOpticalFlowChannels [protected] |
the various directional sub-channels
Definition at line 102 of file MotionOpticalFlowChannel.H.
Referenced by buildSubChans(), and doInput().
nub::ref<FoeDetector> MotionOpticalFlowChannel::itsFoeDetector [protected] |
its Focus of Expansion detector
Definition at line 85 of file MotionOpticalFlowChannel.H.
OModelParam<uint> MotionOpticalFlowChannel::itsNumDirs [protected] |
number of DirectionOpticalFlowChannel subcomponents
Definition at line 82 of file MotionOpticalFlowChannel.H.
Referenced by buildSubChans(), and paramChanged().
stores the optical flow features
Definition at line 105 of file MotionOpticalFlowChannel.H.
Referenced by doInput().
OModelParam<OpticalFlowType> MotionOpticalFlowChannel::itsOpticalFlowType [protected] |
type of optical flow algorithm to use in our DirectionOpticalFlowChannel subcomponents
Definition at line 79 of file MotionOpticalFlowChannel.H.
Referenced by buildSubChans().
Image<byte> MotionOpticalFlowChannel::itsPreviousImage [protected] |
the previous input image
Definition at line 98 of file MotionOpticalFlowChannel.H.
Referenced by doInput().