Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

prapi::texture::Contrast Class Reference

#include <Contrast.h>

Inheritance diagram for prapi::texture::Contrast:

prapi::texture::CircularLocalSampler< double, double > prapi::ImageTransform< double, double > List of all members.

Detailed Description

A class for calculating local contrast.

The contrast for a pixel is defined to be the difference bethween the average gray level of those pixels which have value 1 (bigger than center pixel) and those which have value 0 (less than center pixel).


Public Methods

 Contrast (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::Contrast::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:
Documentation generated on 11.09.2003 with Doxygen.
The documentation is copyrighted material.
Copyright © Topi Mäenpää 2003. All rights reserved.