classMeans

[ XITE Reference Manual | XITE home ]

Name

classMeans - calculate class means

Syntax

 #include <xite/classification.h>

 int classMeans( IMAGE input,
    IBAND classification, float* means[],
    int k );

Description

Calculates new class means.

input may be multi band. classification is the input classification result. means refers to the output mean vectors. k is the number of classes.

means must be indexable on the interval
 means[0..k-1][1..Inbands(input)]
Classes that don't occur at all are given mean values -1000.0.

Restrictions

input and classification must have pixel type unsigned byte.

Return value

 0 => ok
 1 => bad pixel type in input image
 2 => bad pixel type in classification
 3 => bad k value (less than 1)

Author

Tor Lønnestad, BLAB, Ifi, UiO