Public Member Functions | Public Attributes

FastSaliency Class Reference
[Machine Perception Primitives]

Machine Perception Primitive: An implementation of the "Fast Saliency 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 <FastSaliency.h>

Collaboration diagram for FastSaliency:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FastSaliency (int salwidth, int salheight, int numtemporal=2, int numspatial=7, float firsttau=1.0, int firstrad=0)
 Detailed Constructor.
 ~FastSaliency ()
 Simple Destructor.
void updateSaliency (IplImage *colorframe)
 Compute the saliency map for a new input frame.
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< CvPoint > getKeyPoints (int radius=1)
 Find key-point interest detectors using non-maximal suppression on the saliency map.

Public Attributes

IplImage * salImageDouble
 The current saliency image, in Double format, i.e. IPL_DEPTH_64F with 1 channel. These are the raw saliency values (negative log likelihood) computed by the FastSUN algorithm.
IplImage * salImageFloat
 The current saliency iamge, in Float format, i.e. IPL_DEPTH_32F with 1 channel. This is an image representation meant for display, and has values normalized to the range 0-1.

Detailed Description

Machine Perception Primitive: An implementation of the "Fast Saliency 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

FastSaliency::FastSaliency ( int  salwidth,
int  salheight,
int  numtemporal = 2,
int  numspatial = 7,
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 FastSaliency algorithm, so if you want a saliency map of a downscaled image, you must scale the image down to salwidth before calling updateSaliency.
salheightThe height of the input images supplied to the algorithm. Note: No image scaling is done by the FastSaliency algorithm, so if you want a saliency map of a downscaled image, you must scale the image down to salheight before calling updateSaliency.
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.
FastSaliency::~FastSaliency (  )

Simple Destructor.

Deallocates all memory associated with the FastSaliency object.


Member Function Documentation

vector< CvPoint > FastSaliency::getKeyPoints ( int  radius = 1 )

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

Parameters:
radiusNon-maximal suppression radius.
void FastSaliency::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 FastSaliency::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 FastSaliency::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 FastSaliency::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 FastSaliency::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 FastSaliency::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 FastSaliency::updateSaliency ( IplImage *  colorframe )

Compute the saliency map for a new input frame.

Parameters:
colorframeA BGR Color image with width=salwidth and height=salheight. The input image type should be IPL_DEPTH_32F with 3 channels. The saliency map that is computed is accessible via the variables salImageDouble and salImageFloat

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