This class satisfies the requirements of KSSegment.
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. | |
| kmeans::TextureStat::TextureStat | ( | ) |
Initializes all the values.
| 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).
1.4.7