Declaration: |
MeanVarMatrixRing (Data: TDouble2DArray; CentX, CentY, Rad1, Rad2: integer; var Mean, Variance: double): integer; |
Calculates the mean and the variance of the data contained in the two-dimensional array Data, using all values in the annular region defined by its center [CentX,CentY] and the inner and outer radius given by the parameters Rad1 and Rad2 (the center coordinates and the radii are in pixels, the array Data has 0-based indices).
The function returns the following error codes:
0 ... everything is OK
-1 ... CentX and/or CentY are out of range
-2 ... one of the radii is too low or negative
|
Hint: |
In order to calculate the mean and the variance in a circular region, set Rad1 to a zero value. |
|