Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members

# prapi::texture::Variance Class Reference

`#include <Variance.h>`

Inheritance diagram for prapi::texture::Variance:

List of all members.

## Detailed Description

A class for calculating local variance.

The variance for a pixel is defined to be the variance of the surrounding pixels, i.e. C=1/N*sumi=1..N((pi-m)2), where N is the number of circular neighbors for a pixel, pi is the ith circular neighbor, and m is the mean value of the neighborhood, i.e. m=1/N*sumi=1..N(pi).

## Public Methods

Variance (unsigned int samples=8, int predicate=1, bool interpolate=true)
double getValue (double center, List< double > &surrounding)
Subclasses must implement this method to return a transformed value for a center pixel given a known circular neighborhood.

## Member Function Documentation

 double prapi::texture::Variance::getValue ( double center, List< double > & surrounding ) ` [inline, virtual]`

Subclasses must implement this method to return a transformed value for a center pixel given a known circular neighborhood.

The default implementation returns 0. This method is called for each pixel in an matrix from getTransformedImage(Matrix<U>&). For example, the local variance operator returns the variance of the values in surrounding. LBP, in turn, compares each value in surrounding to the value of the center pixel, and builds up a binary code that it then returns.

Parameters:
 center the value of the current center pixel surrounding the values of the surrounding pixels starting from horizontal x-axis direction (3 o'clock) and proceeding clockwise. The length of this list is equal to the number of samples set with the setSamples() method.
Returns:
a transformed value for the center pixel.

Reimplemented from prapi::texture::CircularLocalSampler< double, double >.

The documentation for this class was generated from the following file:
• Variance.h

Documentation generated on 11.09.2003 with Doxygen.