A channel for separating foreground from background. More...
#include <Channels/ForegroundDetectionChannel.H>
Public Member Functions | |
ForegroundDetectionChannel (OptionManager &mgr) | |
Constructor. | |
virtual bool | outputAvailable () const |
overload | |
virtual | ~ForegroundDetectionChannel () |
Virtual destructor. | |
virtual uint | numSubmaps () const |
Return the number of feature maps represented by this channel. | |
virtual Image< float > | getSubmap (const uint index) const |
Get the foreground detection map. | |
virtual Image< float > | getRawCSmap (const uint idx) const |
Bogus function that just returns a blank image so that. | |
virtual std::string | getSubmapName (const uint index) const |
Get the name/description of the feature map at the given index. | |
virtual void | doInput (const InputFrame &inframe) |
special input function | |
virtual Image< float > | getOutput () |
special output function | |
virtual Dims | getMapDims () const |
Return the dimensions of the output image. | |
virtual void | getFeatures (const Point2D< int > &locn, std::vector< float > &mean) const |
virtual void | getFeaturesBatch (std::vector< Point2D< int > * > *locn, std::vector< std::vector< float > > *mean, int *count) const |
Protected Attributes | |
Image< float > | itsForegroundMap |
Image< float > | itsMap |
The probability map of foreground objects. | |
OModelParam< LevelSpec > | itsLevelSpec |
The rescaled output map - for now just the foreground map. | |
CvBGStatModel * | itsStatModel_cv |
A channel for separating foreground from background.
Definition at line 61 of file ForegroundDetectionChannel.H.
ForegroundDetectionChannel::ForegroundDetectionChannel | ( | OptionManager & | mgr | ) |
Constructor.
Definition at line 50 of file ForegroundDetectionChannel.C.
ForegroundDetectionChannel::~ForegroundDetectionChannel | ( | ) | [virtual] |
Virtual destructor.
Definition at line 63 of file ForegroundDetectionChannel.C.
void ForegroundDetectionChannel::doInput | ( | const InputFrame & | inframe | ) | [virtual] |
special input function
Reimplemented from SingleChannel.
Definition at line 106 of file ForegroundDetectionChannel.C.
References ASSERT, Image< T >::deepcopy(), getMapDims(), getMinMax(), img2ipl(), Image< T >::initialized(), ipl2gray(), itsMap, and rescale().
Dims ForegroundDetectionChannel::getMapDims | ( | ) | const [virtual] |
Return the dimensions of the output image.
Reimplemented from SingleChannel.
Definition at line 77 of file ForegroundDetectionChannel.C.
References ChannelBase::getInputDims(), OModelParam< T >::getVal(), Dims::h(), ChannelBase::hasInput(), itsLevelSpec, LevelSpec::mapLevel(), and Dims::w().
Referenced by doInput().
Image< float > ForegroundDetectionChannel::getOutput | ( | ) | [virtual] |
special output function
Reimplemented from SingleChannel.
Definition at line 171 of file ForegroundDetectionChannel.C.
References itsMap.
Bogus function that just returns a blank image so that.
Reimplemented from SingleChannel.
Definition at line 158 of file ForegroundDetectionChannel.C.
Get the foreground detection map.
Reimplemented from SingleChannel.
Definition at line 149 of file ForegroundDetectionChannel.C.
References itsMap.
std::string ForegroundDetectionChannel::getSubmapName | ( | const uint | index | ) | const [virtual] |
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.
Reimplemented from SingleChannel.
Definition at line 164 of file ForegroundDetectionChannel.C.
uint ForegroundDetectionChannel::numSubmaps | ( | ) | const [virtual] |
Return the number of feature maps represented by this channel.
Reimplemented from SingleChannel.
Definition at line 71 of file ForegroundDetectionChannel.C.
bool ForegroundDetectionChannel::outputAvailable | ( | ) | const [virtual] |
overload
Reimplemented from SingleChannel.
Definition at line 67 of file ForegroundDetectionChannel.C.
References Image< T >::initialized(), and itsMap.
OModelParam<LevelSpec> ForegroundDetectionChannel::itsLevelSpec [protected] |
The rescaled output map - for now just the foreground map.
Reimplemented from SingleChannel.
Definition at line 103 of file ForegroundDetectionChannel.H.
Referenced by getMapDims().
Image<float> ForegroundDetectionChannel::itsMap [protected] |
The probability map of foreground objects.
Definition at line 102 of file ForegroundDetectionChannel.H.
Referenced by doInput(), getOutput(), getSubmap(), and outputAvailable().