CStats:GeometricMean
The GeomMean method computes the mean value inside a rectangular region of the image using the geometric mean to assign lower weight to deviant pixels. The rectangle and image must have been previously initialized for the CStats object.
nMean = CStats:GeoMean() |
This method calculates the mean value based on the geometric mean of the sample pixels. This results in pixels being assigned weight that is inversely proportional to their value-distance from the mean. No rejection ("clipping") is performed.
Suppose a CImage named I and a CRect named R exist. The following script fragment returns the geometric mean value inside a rectangle on the image:
|
-- create a CStats object |
|
-- specify CImage and CRect to measure |
|
-- return the geometric mean value |
|
-- list the result |
|
-- when done with S, remove it from memory |
CStats, CImage, CRect, Mean, SigmaClipMean , ContraMean , YpMean