Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

fancynorm.H File Reference


Detailed Description

Intrafeature competition with maxNormalize().

Definition in file fancynorm.H.

#include "Util/log.H"
#include <string>

Include dependency graph for fancynorm.H:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Types of normalization (normtyp)

#define NBMAXNORMTYPES   13
#define VCXNORM_DEFAULT   VCXNORM_FANCY
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.

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()

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).
std::string convertToString (const MaxNormType val)
 MaxNormType overload.
void convertFromString (const std::string &str, MaxNormType &val)
 MaxNormType overload.


Define Documentation

#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.

Referenced by main().


Enumeration Type Documentation

enum MaxNormType
 

Enumerator:
VCXNORM_NONE  no max-normalization, but may change range
VCXNORM_MAXNORM  non-iterative maxnorm
VCXNORM_FANCY  full implementation of fancy maxnorm
VCXNORM_FANCYFAST  fast implementation of fancy maxnorm
VCXNORM_FANCYONE  one-iteration only of fancy maxnorm
VCXNORM_FANCYLANDMARK  fancy maxnorm to find landmark
VCXNORM_LANDMARK  to find landmarks
VCXNORM_FANCYWEAK  Weak version of FancyOne.
VCXNORM_IGNORE  Do absolutely nothing, not even change range.
VCXNORM_SURPRISE  Like ignore but VCX will do something.
VCXNORM_FANCYVWEAK  Very weak version of FancyOne.
VCXNORM_STDEV  normalize map to have stdev=1, minval=0
VCXNORM_STDEV0  normalize map to have stdev=1, mean=0

Definition at line 51 of file fancynorm.H.


Function Documentation

void convertFromString const std::string str,
MaxNormType val
 

MaxNormType overload.

Format is "name" as defined by maxNormTypeName() in MaxNormTypes.H

Definition at line 638 of file fancynorm.C.

References GVX_TRACE, i, maxNormTypeName(), and NBMAXNORMTYPES.

std::string convertToString const MaxNormType  val  ) 
 

MaxNormType overload.

Format is "name" as defined by maxNormTypeName() in MaxNormTypes.H

Definition at line 632 of file fancynorm.C.

References GVX_TRACE, and maxNormTypeName().

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)

Definition at line 484 of file fancynorm.C.

References area, findMax(), GVX_TRACE, rutz::max(), maxNormalize(), segmentLandmark(), target, and VCXNORM_FANCY.

Referenced by goodness_map(), maxNormalizeLandmark(), SimulationViewerStats::save1(), and SimulationViewerNerdCam::writeStatusPage().

template<class T>
float goodness_map const Image< T > &  src  ) 
 

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(), GVX_TRACE, Image< T >::initialized(), inplaceNormalize(), LINFO, rutz::max(), MAXNORMLANDMARK, MAXNORMMIN, segmentLandmark(), and target.

Referenced by ComplexChannel::combineOutputs(), SingleChannel::combineSubMaps(), goodness_map(), and maxNormalizeLandmark().

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).

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.

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).

fancyNorm from Itti et al, JEI, 2001; FULL implementation.

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).

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, getMinMax(), GVX_TRACE, h, i, Image< T >::initialized(), inplaceAttenuateBorders(), inplaceNormalize(), inplaceRectify(), log(), rutz::max(), rescale(), sqrt(), and w.

Referenced by maxNormalize().

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).

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, getMinMax(), GVX_TRACE, h, i, Image< T >::initialized(), inplaceNormalize(), inplaceRectify(), rutz::max(), rutz::min(), sepFilter(), sqrt(), and w.

Referenced by maxNormalize().

template<class T>
Image<T> maxNormalizeLandmark const Image< T > &  src,
const T  mi,
const T  ma
 

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(), GVX_TRACE, Image< T >::initialized(), inplaceNormalize(), LINFO, rutz::max(), MAXNORMLANDMARK, MAXNORMMIN, Image< T >::resize(), segmentLandmark(), and target.

Referenced by maxNormalize().

template<class T>
Image<T> maxNormalizeNone const Image< T > &  src,
const T  mi,
const T  ma
 

Specialized implementation (corresponds to VCXNORM_NONE).

No max-normalization, just normalize between mi and ma.

Definition at line 130 of file fancynorm.C.

References GVX_TRACE, inplaceNormalize(), and inplaceRectify().

Referenced by maxNormalize().

template<class T>
Image<T> maxNormalizeStd const Image< T > &  src,
const T  mi,
const T  ma
 

Specialized implementation (corresponds to VCXNORM_MAXNORM).

maxNorm from Itti et al, IEEE-PAMI, 1998.

Definition at line 147 of file fancynorm.C.

References ASSERT, GVX_TRACE, h, i, Dlist::index(), Image< T >::initialized(), inplaceNormalize(), inplaceRectify(), and w.

Referenced by maxNormalize().

template<class T>
Image<T> maxNormalizeStdev const Image< T > &  src  ) 
 

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(), s, stdev(), and ZEROS.

Referenced by maxNormalize().

template<class T>
Image<T> maxNormalizeStdev0 const Image< T > &  src  ) 
 

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(), s, stdev(), u(), 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 LFATAL, n, and NBMAXNORMTYPES.

Referenced by ComplexChannel::combineOutputs(), IntegerComplexChannel::combineOutputsInt(), SingleChannel::combineSubMaps(), HueChannel::combineSubMaps(), convertFromString(), convertToString(), IntegerSimpleChannel::getOutputInt(), IntegerSimpleChannel::getSubmapInt(), SingleChannel::postProcessMap(), VisualCortexSurprise::postProcessOutputMap(), RawVisualCortex::postProcessOutputMap(), and IntegerRawVisualCortex::postProcessOutputMap().


Variable Documentation

const double FANCYCOEX = 0.5
 

excitatory coefficient (strength)

Definition at line 97 of file fancynorm.H.

Referenced by cudaMaxNormalizeFancy(), maxNormalizeFancy(), maxNormalizeFancyFast(), and maxNormalizeFancyLandmark().

const double FANCYCOIN = 1.5
 

inhibitory coefficient (strength)

Definition at line 98 of file fancynorm.H.

Referenced by cudaMaxNormalizeFancy(), maxNormalizeFancy(), maxNormalizeFancyFast(), and maxNormalizeFancyLandmark().

const double FANCYESIG = 2
 

excitatory sigma as % of image size

Definition at line 95 of file fancynorm.H.

Referenced by cudaMaxNormalizeFancy(), 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 cudaMaxNormalizeFancy(), maxNormalizeFancy(), maxNormalizeFancyFast(), and maxNormalizeFancyLandmark().

const double FANCYISIG = 25
 

inhibitory sigma as % of image size

Definition at line 96 of file fancynorm.H.

Referenced by cudaMaxNormalizeFancy(), 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 cudaMaxNormalizeFancy(), and 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(), CMap_i::computeBiasCMAP(), ComputeCMAP(), computeCMAP(), CMap_i::computeCMAP(), BeoSubSaliency::computeCMAP(), SaliencyMT::computeCMAP(), CudaSaliency::cudaPostChannel(), ContourChannel::doInput(), IntegerSimpleChannel::getSubmapInt(), RegSaliency::postChannel(), SingleChannel::postProcessMap(), and BeobotBrainMT::threadCompute().

const float MAXNORMMIN = 0.0f
 

lower bound for maxNormalize()

Definition at line 115 of file fancynorm.H.

Referenced by SoxChannel::combineOutputs(), CMap_i::computeBiasCMAP(), ComputeCMAP(), computeCMAP(), CMap_i::computeCMAP(), BeoSubSaliency::computeCMAP(), SaliencyMT::computeCMAP(), CudaSaliency::cudaPostChannel(), ContourChannel::doInput(), IntegerSimpleChannel::getSubmapInt(), goodness_map(), maxNormalizeLandmark(), RegSaliency::postChannel(), SingleChannel::postProcessMap(), and BeobotBrainMT::threadCompute().


Generated on Sun Nov 22 13:44:05 2009 for iLab Neuromorphic Vision Toolkit by  doxygen 1.4.4