Public Member Functions

FastSalience Class Reference
[Machine Perception Primitives]

Machine Perception Primitive: An implementation of the "Fast Salience Using Natural-statistics" algorithm from Butko, et al., 2008. FastSUN is an efficient implementation of Zhang et al.'s SUN algorithm, which is documented in Zhang, et al., 2008 (see Related Publications). More...

#include <FastSalience.h>

Collaboration diagram for FastSalience:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FastSalience (int numtemporal, int numspatial, float firsttau=1.0, int firstrad=0)
 Detailed Constructor.
 FastSalience ()
 Default Constructor: construct a FastSalience feature detector with default parameters.
virtual ~FastSalience ()
 Simple Destructor.
void updateSalience (const cv::Mat &image)
 Compute the salience map for a new input frame.
void getSalMap (cv::Mat &dest) const
 The current salience map -- negative log likelihood values.
void getSalImage (cv::Mat &dest) const
 The current salience iamge, normalized to the range 0-1 for display.
void setGGDistributionPower (double value)
 Set the Generalized-Gaussian feature distribution to be something other than Laplacian.
void setUseDoEFeatures (int flag)
 Toggle use of Difference of Exponential (motion) features. On by default.
void setUseDoBFeatures (int flag)
 Toggle use of Difference of Box (spatial) features. On by default.
void setUseColorInformation (int flag)
 Toggle use of Color Contrast (red-green and blue-yellow) information. On by default.
void setUseGGDistributionParams (int flag)
 Toggle use of custom Generalized Gaussian Distribution parameters. On by default.
void setEstimateGGDistributionParams (int flag)
 Toggle estimation of custom Generalized Gaussian Distribution parameters. On by default.
std::vector< cv::KeyPoint > getKeyPoints (int radius=2) const
 Find key-point interest detectors using non-maximal suppression on the salience map.

Detailed Description

Machine Perception Primitive: An implementation of the "Fast Salience Using Natural-statistics" algorithm from Butko, et al., 2008. FastSUN is an efficient implementation of Zhang et al.'s SUN algorithm, which is documented in Zhang, et al., 2008 (see Related Publications).

Author:
Nicholas Butko
Date:
2010 version 0.4

Constructor & Destructor Documentation

FastSalience::FastSalience ( int  numtemporal,
int  numspatial,
float  firsttau = 1.0,
int  firstrad = 0 
)

Detailed Constructor.

Parameters:
salwidthThe width of the input images supplied to the algorithm. Note: No image scaling is done by the FastSalience algorithm, so if you want a salience map of a downscaled image, you must scale the image down to salwidth before calling updateSalience.
salheightThe height of the input images supplied to the algorithm. Note: No image scaling is done by the FastSalience algorithm, so if you want a salience map of a downscaled image, you must scale the image down to salheight before calling updateSalience.
numtemporalNumber of timescales of Difference of Expontential filters to track.
numspatialNumber of sizes of Difference of Box filters to use.
firsttauExponential Falloff parameter for the first Difference of Exponentials scale. Lower numbers give slower falloff. Must be greater than 0.
firstradRadius of smallest Difference of Boxes filter center. The diameter of the box is 2*rad+1, so the smallest allowed first radius is 0.
FastSalience::~FastSalience (  ) [virtual]

Simple Destructor.

Deallocates all memory associated with the FastSalience object.


Member Function Documentation

vector< KeyPoint > FastSalience::getKeyPoints ( int  radius = 2 ) const

Find key-point interest detectors using non-maximal suppression on the salience map.

Parameters:
radiusNon-maximal suppression radius.
void FastSalience::setEstimateGGDistributionParams ( int  flag )

Toggle estimation of custom Generalized Gaussian Distribution parameters. On by default.

Initially we assume that image features are drawn from a Laplace distribution of zero mean and unit variance. However, these parameters can be estimated and adjusted online to better reflect the statistics of the current environment. If off, the current estimate of the mean and variance are used. If on, the estimate updates with each new frame (at small computational cost). One approach would be to estimate the parameters for a few frames, and then when the estimates no longer change much, to turn off estimation and just use the "learned" parameters.

Parameters:
flagIf 0, turn off estimation of histogram information. Otherwise, calculate it.
void FastSalience::setGGDistributionPower ( double  value )

Set the Generalized-Gaussian feature distribution to be something other than Laplacian.

Image features often exhibit marginal histograms that are of a generalized Gaussian form. The power of these distributions is often between .5 and .7, but performing this power computation is numerically slow. By using a Laplacian distribution (power of one) by defuault, the salience estimate is worse, but much faster to compute. Setting "power" to some lower value may give better but slower resultes.

Parameters:
valueThe power of a generalized-gaussian feature distribution.
void FastSalience::setUseColorInformation ( int  flag )

Toggle use of Color Contrast (red-green and blue-yellow) information. On by default.

Parameters:
flagIf 0, turn off Color Contrast information. Otherwise, calculate it.
void FastSalience::setUseDoBFeatures ( int  flag )

Toggle use of Difference of Box (spatial) features. On by default.

Parameters:
flagIf 0, turn off DoB features. Otherwise, calculate them.
void FastSalience::setUseDoEFeatures ( int  flag )

Toggle use of Difference of Exponential (motion) features. On by default.

Parameters:
flagIf 0, turn off DoE features. Otherwise, calculate them.
void FastSalience::setUseGGDistributionParams ( int  flag )

Toggle use of custom Generalized Gaussian Distribution parameters. On by default.

If this is off, we assume that image features are drawn from a Laplace distribution of zero mean and unit variance. However, these parameters can be estimated and adjusted online to better reflect the statistics of the current environment. If on, these online estimates will be used (at small computational cost).

Parameters:
flagIf 0, turn off the use of histogram estimate information. Otherwise, use it.
void FastSalience::updateSalience ( const cv::Mat &  image )

Compute the salience map for a new input frame.

Parameters:
colorframeA BGR Color image with width=salwidth and height=salheight. The input image type should be CV_8U3, CV_8U1, CV_32FC1, or CV_32FC3. The salience map that is computed is accessible via getSalImageDouble and getSalImageFloat

The documentation for this class was generated from the following files: