A Michelson contrast channel, computes Michelson contrast in an image patch. More...
#include <Channels/MichelsonChannel.H>
Public Member Functions | |
MichelsonChannel (OptionManager &mgr) | |
Construct with standard params. | |
virtual | ~MichelsonChannel () |
Destructor. | |
virtual bool | outputAvailable () const |
overload | |
Protected Member Functions | |
virtual void | doInput (const InputFrame &inframe) |
special input function | |
virtual Image< float > | getOutput () |
special output function | |
Protected Attributes | |
Image< float > | itsMap |
our michelson contrast map |
A Michelson contrast channel, computes Michelson contrast in an image patch.
CAUTION: this channel will throw a fatal exception if your LevelSpec contains more than one level or if that level is different from the maplevel or if the deltas are non-zero. Michelson contrast in every map pixel is computed as abs( (La-Li) / (La+Li) ) where La is the local patch luminance and Li the average image luminance.
Definition at line 50 of file MichelsonChannel.H.
MichelsonChannel::MichelsonChannel | ( | OptionManager & | mgr | ) |
Construct with standard params.
Definition at line 45 of file MichelsonChannel.C.
MichelsonChannel::~MichelsonChannel | ( | ) | [virtual] |
Destructor.
Definition at line 52 of file MichelsonChannel.C.
void MichelsonChannel::doInput | ( | const InputFrame & | inframe | ) | [protected, virtual] |
special input function
Reimplemented from SingleChannel.
Definition at line 60 of file MichelsonChannel.C.
References ASSERT, Image< T >::begin(), Image< T >::beginw(), LevelSpec::delMax(), LevelSpec::delMin(), Image< T >::end(), Image< T >::getDims(), SingleChannel::getImage(), getMinMaxAvg(), OModelParam< T >::getVal(), Image< T >::initialized(), itsMap, LevelSpec::levMax(), LevelSpec::levMin(), lum, LevelSpec::mapLevel(), Image< T >::resize(), and ModelComponent::stop().
Image< float > MichelsonChannel::getOutput | ( | ) | [protected, virtual] |
special output function
Reimplemented from SingleChannel.
Definition at line 87 of file MichelsonChannel.C.
References itsMap.
bool MichelsonChannel::outputAvailable | ( | ) | const [virtual] |
overload
Reimplemented from SingleChannel.
Definition at line 56 of file MichelsonChannel.C.
References Image< T >::initialized(), and itsMap.
Image<float> MichelsonChannel::itsMap [protected] |
our michelson contrast map
Definition at line 69 of file MichelsonChannel.H.
Referenced by doInput(), getOutput(), and outputAvailable().