kmeans::TextureStat Class Reference

List of all members.

Detailed Description

Stores statistics associated with a pixel in an image.

This class satisfies the requirements of KSSegment.

See also:
KSSegment
Author:
Lakshman
Version:
Id
TextureStat.h,v 1.3 2009/06/02 20:17:50 lakshman Exp


Public Types

 MEAN
 The mean in the neighborhood.
 VAR
 Local variance.
 CVAR
 Coefficient of variation.
 SKEW
 Skewness.
 KURT
 Kurtosis.
 CONT
 Contrast.
 HOM
 Homogeneity.
 NumFeatures
 The total number of features.
enum  Statistics {
  MEAN, VAR, CVAR, SKEW,
  KURT, CONT, HOM, NumFeatures
}

Public Member Functions

float get_val (size_t index) const
 index should be one of the Statistics enums (< NumFeatures).
void set_val (size_t index, float val)
 index should be one of the Statistics enums (< NumFeatures).
 TextureStat ()
 Initializes all the values.

Static Public Member Functions

static float get_wt (size_t index)
 Returns the weight that should be given to the ith Statistic.
static void scale (ImageAttr< TextureStat > &img)
 Scales all the values such that they lie in the range 0 to 1.
static void compute (const LImage< int > &img, ImageAttr< TextureStat > *tobe_set, bool normalize=true, size_t neighborhood_size=7)
 Computes the texture of this image and sets the ImageAttr passed in.


Member Enumeration Documentation

enum kmeans::TextureStat::Statistics

Enumerator:
MEAN  The mean in the neighborhood.
VAR  Local variance.
CVAR  Coefficient of variation.
SKEW  Skewness.
KURT  Kurtosis.
CONT  Contrast.
HOM  Homogeneity.
NumFeatures  The total number of features.


Constructor & Destructor Documentation

kmeans::TextureStat::TextureStat (  ) 

Initializes all the values.


Member Function Documentation

static void kmeans::TextureStat::compute ( const LImage< int > &  img,
ImageAttr< TextureStat > *  tobe_set,
bool  normalize = true,
size_t  neighborhood_size = 7 
) [static]

Computes the texture of this image and sets the ImageAttr passed in.

the ImageAttr<TextureStat> passed is replaced.

float kmeans::TextureStat::get_val ( size_t  index  )  const

index should be one of the Statistics enums (< NumFeatures).

static float kmeans::TextureStat::get_wt ( size_t  index  )  [static]

Returns the weight that should be given to the ith Statistic.

The weights add upto 1.0

static void kmeans::TextureStat::scale ( ImageAttr< TextureStat > &  img  )  [static]

Scales all the values such that they lie in the range 0 to 1.

void kmeans::TextureStat::set_val ( size_t  index,
float  val 
)

index should be one of the Statistics enums (< NumFeatures).


Generated on Fri May 4 13:40:22 2012 for WDSS-IIw2algs by  doxygen 1.4.7