This class satisfies the requirements of KSSegment.
Public Types | |
| VALUE | |
| The value at this point itself. | |
| MEAN | |
| The mean in the neighborhood. | |
| VAR | |
| Local variance. | |
| NumFeatures | |
| The total number of features. | |
| enum | Statistics { VALUE, MEAN, VAR, 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). | |
| StormStat () | |
| 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< StormStat > &img) |
| Scales all the values such that they lie in the range 0 to 1. | |
| static void | compute (const LImage< int > &img, ImageAttr< StormStat > *tobe_set, bool normalize=true, size_t neighborhood_size=3) |
| Computes the texture of this image and sets the ImageAttr passed in. | |
| kmeans::StormStat::StormStat | ( | ) |
Initializes all the values.
| static void kmeans::StormStat::compute | ( | const LImage< int > & | img, | |
| ImageAttr< StormStat > * | tobe_set, | |||
| bool | normalize = true, |
|||
| size_t | neighborhood_size = 3 | |||
| ) | [static] |
Computes the texture of this image and sets the ImageAttr passed in.
the ImageAttr<StormStat> passed is replaced.
| float kmeans::StormStat::get_val | ( | size_t | index | ) | const |
index should be one of the Statistics enums (< NumFeatures).
| static float kmeans::StormStat::get_wt | ( | size_t | index | ) | [static] |
Returns the weight that should be given to the ith Statistic.
The weights add upto 1.0
Scales all the values such that they lie in the range 0 to 1.
| void kmeans::StormStat::set_val | ( | size_t | index, | |
| float | val | |||
| ) |
index should be one of the Statistics enums (< NumFeatures).
1.4.7