Functions | |
template<class T > | |
Image< T > | maxNormalize (const Image< T > &src, const T mi, const T ma, const MaxNormType normtyp=VCXNORM_DEFAULT, int nbiter=FANCYITER, const Image< float > *lrexcit=0) |
Generic implementation (select algorithm with normtyp). | |
template<class T > | |
Image< T > | maxNormalizeNone (const Image< T > &src, const T mi, const T ma) |
Specialized implementation (corresponds to VCXNORM_NONE). | |
template<class T > | |
Image< T > | maxNormalizeStd (const Image< T > &src, const T mi, const T ma) |
Specialized implementation (corresponds to VCXNORM_MAXNORM). | |
template<class T > | |
Image< T > | maxNormalizeFancyFast (const Image< T > &src, const T mi, const T ma, const int nbiter=FANCYITER) |
Specialized implementation (corresponds to VCXNORM_FANCYFAST). | |
template<class T > | |
Image< T > | maxNormalizeFancy (const Image< T > &src, const T mi, const T ma, const int nbiter=FANCYITER, const double weakness=1.0, const Image< float > *lrexcit=0) |
Specialized implementation (corresponds to VCXNORM_FANCY). | |
template<class T > | |
Image< T > | maxNormalizeFancyLandmark (const Image< T > &src, const T mi, const T ma, const int nbiter=FANCYITER) |
Specialized implementation (corresponds to VCXNORM_FANCY). | |
template<class T > | |
Image< T > | maxNormalizeLandmark (const Image< T > &src, const T mi, const T ma) |
Specialized implementation (corresponds to VCXNORM_LANDMARK). | |
template<class T > | |
int | findPeaks (const Image< T > &src, const T mi, const T ma, double &sum) |
to find number of peaks in the image (used in landmark detection) | |
template<class T > | |
float | goodness_map (const Image< T > &src) |
to find the goodness of a map (used in landmark detection) | |
template<class T > | |
Image< T > | maxNormalizeStdev (const Image< T > &src) |
Specialized implementation (corresponds to VCXNORM_STDEV). | |
template<class T > | |
Image< T > | maxNormalizeStdev0 (const Image< T > &src) |
Specialized implementation (corresponds to VCXNORM_STDEV0). | |
Types of normalization (normtyp) | |
| |
enum | MaxNormType { VCXNORM_NONE = 0, VCXNORM_MAXNORM = 1, VCXNORM_FANCY = 2, VCXNORM_FANCYFAST = 3, VCXNORM_FANCYONE = 4, VCXNORM_FANCYLANDMARK = 5, VCXNORM_LANDMARK = 6, VCXNORM_FANCYWEAK = 7, VCXNORM_IGNORE = 8, VCXNORM_SURPRISE = 9, VCXNORM_FANCYVWEAK = 10, VCXNORM_STDEV = 11, VCXNORM_STDEV0 = 12 } |
const char * | maxNormTypeName (const MaxNormType m) |
Get a name in clear for a given type. | |
#define | NBMAXNORMTYPES 13 |
#define | VCXNORM_DEFAULT VCXNORM_FANCY |
Additional parameters for fancynorm versions of the algorithm. | |
| |
const int | FANCYITER = 5 |
default number of iterations | |
const double | FANCYESIG = 2 |
excitatory sigma as % of image size | |
const double | FANCYISIG = 25 |
inhibitory sigma as % of image size | |
const double | FANCYCOEX = 0.5 |
excitatory coefficient (strength) | |
const double | FANCYCOIN = 1.5 |
inhibitory coefficient (strength) | |
const double | FANCYINHI = 2.0 |
strength of global inhibition | |
const double | FANCYG = 2.1 |
for sigmoid normalization | |
const double | FANCYH = 2.0 |
for sigmoid normalization | |
const double | FANCYS = 1.0 |
for sigmoid normalization | |
const int | LRLEVEL = 2 |
for tuned long-range excitation: | |
Standard min/max bounds for maxNormalize(). | |
| |
const float | MAXNORMMAX = 10.0f |
upper bound for maxNormalize() | |
const float | MAXNORMMIN = 0.0f |
lower bound for maxNormalize() | |
const float | MAXNORMLANDMARK = 255.0f |
upper bound for maxNormalizeFancyLandmark() |
#define NBMAXNORMTYPES 13 |
Have this value always equal to the largest of the VCXNORMs (used for range checking)
Definition at line 70 of file fancynorm.H.
Referenced by convertFromString(), and maxNormTypeName().
#define VCXNORM_DEFAULT VCXNORM_FANCY |
Always points to the default maxnorm operation
Definition at line 88 of file fancynorm.H.
enum MaxNormType |
Definition at line 51 of file fancynorm.H.
int findPeaks | ( | const Image< T > & | src, | |
const T | mi, | |||
const T | ma, | |||
double & | sum | |||
) | [inline] |
to find number of peaks in the image (used in landmark detection)
Definition at line 484 of file fancynorm.C.
References area(), findMax(), max(), maxNormalize(), segmentLandmark(), and VCXNORM_FANCY.
Referenced by goodness_map(), maxNormalizeLandmark(), SimulationViewerStats::save1(), and SimulationViewerNerdCam::writeStatusPage().
float goodness_map | ( | const Image< T > & | src | ) | [inline] |
to find the goodness of a map (used in landmark detection)
Definition at line 518 of file fancynorm.C.
References ASSERT, findMax(), findPeaks(), goodness_map(), Image< T >::initialized(), inplaceNormalize(), max(), MAXNORMLANDMARK, MAXNORMMIN, and segmentLandmark().
Referenced by ComplexChannel::combineOutputs(), SingleChannel::combineSubMaps(), goodness_map(), and maxNormalizeLandmark().
Image<T> maxNormalize | ( | const Image< T > & | src, | |
const T | mi, | |||
const T | ma, | |||
const MaxNormType | normtyp = VCXNORM_DEFAULT , |
|||
int | nbiter = FANCYITER , |
|||
const Image< float > * | lrexcit = 0 | |||
) | [inline] |
Generic implementation (select algorithm with normtyp).
Normalize between mi and ma and multiply by (ma - mean). Versions with more arguments implement the core within-feature spatial competition for salience. See papers for details.
Definition at line 63 of file fancynorm.C.
References getMinMax(), maxNormalizeFancy(), maxNormalizeFancyFast(), maxNormalizeFancyLandmark(), maxNormalizeLandmark(), maxNormalizeNone(), maxNormalizeStd(), maxNormalizeStdev(), maxNormalizeStdev0(), VCXNORM_FANCY, VCXNORM_FANCYFAST, VCXNORM_FANCYLANDMARK, VCXNORM_FANCYONE, VCXNORM_FANCYVWEAK, VCXNORM_FANCYWEAK, VCXNORM_IGNORE, VCXNORM_LANDMARK, VCXNORM_MAXNORM, VCXNORM_NONE, VCXNORM_STDEV, VCXNORM_STDEV0, and VCXNORM_SURPRISE.
Referenced by DirectFeedChannel::applyMaxNorm(), ComplexChannel::combineOutputs(), MultiDirectFeedChannel::combineOutputs(), SoxChannel::combineOutputs(), HueChannel::combineSubMaps(), SingleChannel::combineSubMaps(), SaliencyMT::computeCMAP(), BeoSubSaliency::computeCMAP(), computeCMAP(), ObjDetChannel::doInput(), ContourChannel::doInput(), findPeaks(), SpectralResidualChannel::getOutput(), SingleChannel::getRawCSmap(), DirectionSpatioTemporalChannel::getRawCSmap(), main(), normalizMAP(), SingleChannel::postProcessMap(), RawVisualCortex::postProcessOutputMap(), VisualCortexSurprise::postProcessOutputMap(), BeobotVisualCortex::process(), BeobotVisualCortex::processEnd(), RegSaliency::runSaliency(), and BeobotBrainMT::threadCompute().
Image<T> maxNormalizeFancy | ( | const Image< T > & | src, | |
const T | mi, | |||
const T | ma, | |||
const int | nbiter = FANCYITER , |
|||
const double | weakness = 1.0 , |
|||
const Image< float > * | lrexcit = 0 | |||
) | [inline] |
Specialized implementation (corresponds to VCXNORM_FANCY).
fancyNorm from Itti et al, JEI, 2001; FULL implementation.
Definition at line 265 of file fancynorm.C.
References ASSERT, CONV_BOUNDARY_CLEAN, CONV_BOUNDARY_ZERO, convolve(), downSize(), FANCYCOEX, FANCYCOIN, FANCYESIG, FANCYINHI, FANCYISIG, Image< T >::getHeight(), getMinMax(), Image< T >::getWidth(), Image< T >::initialized(), inplaceClamp(), inplaceNormalize(), inplaceRectify(), LRLEVEL, max(), min(), rescale(), sepFilter(), and sqrt().
Referenced by maxNormalize().
Image<T> maxNormalizeFancyFast | ( | const Image< T > & | src, | |
const T | mi, | |||
const T | ma, | |||
const int | nbiter = FANCYITER | |||
) | [inline] |
Specialized implementation (corresponds to VCXNORM_FANCYFAST).
fancyNorm from Itti et al, JEI, 2001; FAST implementation.
Definition at line 206 of file fancynorm.C.
References ASSERT, buildPyrGaussian(), FANCYCOEX, FANCYCOIN, FANCYESIG, FANCYINHI, FANCYISIG, Image< T >::getHeight(), getMinMax(), Image< T >::getWidth(), Image< T >::initialized(), inplaceAttenuateBorders(), inplaceNormalize(), inplaceRectify(), log(), max(), rescale(), and sqrt().
Referenced by maxNormalize().
Image<T> maxNormalizeFancyLandmark | ( | const Image< T > & | src, | |
const T | mi, | |||
const T | ma, | |||
const int | nbiter = FANCYITER | |||
) | [inline] |
Specialized implementation (corresponds to VCXNORM_FANCY).
fancyNorm from Itti et al, JEI, 2001; FULL implementation. adapted to find landmarks
Definition at line 331 of file fancynorm.C.
References ASSERT, CONV_BOUNDARY_CLEAN, FANCYCOEX, FANCYCOIN, FANCYINHI, Image< T >::getHeight(), getMinMax(), Image< T >::getWidth(), Image< T >::initialized(), inplaceNormalize(), inplaceRectify(), max(), min(), sepFilter(), and sqrt().
Referenced by maxNormalize().
Image<T> maxNormalizeLandmark | ( | const Image< T > & | src, | |
const T | mi, | |||
const T | ma | |||
) | [inline] |
Specialized implementation (corresponds to VCXNORM_LANDMARK).
to find landmarks
Definition at line 382 of file fancynorm.C.
References ASSERT, findMax(), findPeaks(), Image< T >::getDims(), Image< T >::getVal(), goodness_map(), Image< T >::initialized(), inplaceNormalize(), max(), MAXNORMLANDMARK, MAXNORMMIN, Image< T >::resize(), and segmentLandmark().
Referenced by maxNormalize().
Image<T> maxNormalizeNone | ( | const Image< T > & | src, | |
const T | mi, | |||
const T | ma | |||
) | [inline] |
Specialized implementation (corresponds to VCXNORM_NONE).
No max-normalization, just normalize between mi and ma.
Definition at line 130 of file fancynorm.C.
References inplaceNormalize(), and inplaceRectify().
Referenced by maxNormalize().
Image<T> maxNormalizeStd | ( | const Image< T > & | src, | |
const T | mi, | |||
const T | ma | |||
) | [inline] |
Specialized implementation (corresponds to VCXNORM_MAXNORM).
maxNorm from Itti et al, IEEE-PAMI, 1998.
Definition at line 147 of file fancynorm.C.
References ASSERT, Image< T >::getHeight(), Image< T >::getVal(), Image< T >::getWidth(), Image< T >::initialized(), inplaceNormalize(), and inplaceRectify().
Referenced by maxNormalize().
Specialized implementation (corresponds to VCXNORM_STDEV).
The output image is the result of normalizing the input image to have stdev=1 and minval=0, by simply dividing by the stdev of the original image and then subtracting the minval of the resulting image. We set minval=0, rather than the more natural mean=0, because maxNormalize functions traditionally return images with only non-negative values, since negative values will likely eventually be subject to a rectification. The choice of minval=0 or mean=0 has no effect on the statistics of maps produced by summing several stdev-normalized maps; the resulting map itself will have the same stdev in either case, and the only difference will be a shift in its mean.
Definition at line 586 of file fancynorm.C.
References Image< T >::getDims(), getMinMax(), stdev(), and ZEROS.
Referenced by maxNormalize().
Specialized implementation (corresponds to VCXNORM_STDEV0).
The output image is the result of normalizing the input image to have mean=0 and stdev=1, by simply subtracting the mean of the original image and then dividing by the stdev of the original image. Beware that the resulting image will have negative values, which may be truncated by later rectification steps.
Definition at line 608 of file fancynorm.C.
References Image< T >::getDims(), mean(), stdev(), and ZEROS.
Referenced by maxNormalize().
const char* maxNormTypeName | ( | const MaxNormType | m | ) | [inline] |
Get a name in clear for a given type.
Definition at line 73 of file fancynorm.H.
References NBMAXNORMTYPES.
Referenced by ComplexChannel::combineOutputs(), IntegerComplexChannel::combineOutputsInt(), HueChannel::combineSubMaps(), SingleChannel::combineSubMaps(), convertFromString(), convertToString(), ObjDetChannel::doInput(), SingleChannel::postProcessMap(), RawVisualCortex::postProcessOutputMap(), VisualCortexSurprise::postProcessOutputMap(), and IntegerRawVisualCortex::postProcessOutputMap().
const double FANCYCOEX = 0.5 |
excitatory coefficient (strength)
Definition at line 97 of file fancynorm.H.
Referenced by maxNormalizeFancy(), maxNormalizeFancyFast(), and maxNormalizeFancyLandmark().
const double FANCYCOIN = 1.5 |
inhibitory coefficient (strength)
Definition at line 98 of file fancynorm.H.
Referenced by maxNormalizeFancy(), maxNormalizeFancyFast(), and maxNormalizeFancyLandmark().
const double FANCYESIG = 2 |
excitatory sigma as % of image size
Definition at line 95 of file fancynorm.H.
Referenced by maxNormalizeFancy(), and maxNormalizeFancyFast().
const double FANCYG = 2.1 |
for sigmoid normalization
Definition at line 101 of file fancynorm.H.
const double FANCYH = 2.0 |
for sigmoid normalization
Definition at line 102 of file fancynorm.H.
const double FANCYINHI = 2.0 |
strength of global inhibition
Definition at line 99 of file fancynorm.H.
Referenced by maxNormalizeFancy(), maxNormalizeFancyFast(), and maxNormalizeFancyLandmark().
const double FANCYISIG = 25 |
inhibitory sigma as % of image size
Definition at line 96 of file fancynorm.H.
Referenced by maxNormalizeFancy(), and maxNormalizeFancyFast().
const int FANCYITER = 5 |
default number of iterations
Definition at line 94 of file fancynorm.H.
const double FANCYS = 1.0 |
for sigmoid normalization
Definition at line 103 of file fancynorm.H.
const int LRLEVEL = 2 |
for tuned long-range excitation:
Definition at line 105 of file fancynorm.H.
Referenced by maxNormalizeFancy().
const float MAXNORMLANDMARK = 255.0f |
upper bound for maxNormalizeFancyLandmark()
Definition at line 117 of file fancynorm.H.
Referenced by goodness_map(), and maxNormalizeLandmark().
const float MAXNORMMAX = 10.0f |
upper bound for maxNormalize()
Definition at line 113 of file fancynorm.H.
Referenced by SoxChannel::combineOutputs(), SaliencyMT::computeCMAP(), BeoSubSaliency::computeCMAP(), computeCMAP(), ContourChannel::doInput(), DirectionSpatioTemporalChannel::getRawCSmap(), normalizMAP(), SingleChannel::postProcessMap(), CudaSaliency::runSaliency(), RegSaliency::runSaliency(), and BeobotBrainMT::threadCompute().
const float MAXNORMMIN = 0.0f |
lower bound for maxNormalize()
Definition at line 115 of file fancynorm.H.
Referenced by SoxChannel::combineOutputs(), SaliencyMT::computeCMAP(), BeoSubSaliency::computeCMAP(), computeCMAP(), ContourChannel::doInput(), DirectionSpatioTemporalChannel::getRawCSmap(), goodness_map(), maxNormalizeLandmark(), normalizMAP(), SingleChannel::postProcessMap(), CudaSaliency::runSaliency(), RegSaliency::runSaliency(), and BeobotBrainMT::threadCompute().