CStats:MaxClipMean
The MaxClipMean method computes the maximum-clipped mean value inside a rectangular region of the image. The rectangle and image must have been previously initialized for the CStats object.
nMean = CStats:MaxClipMean() |
The calculated statistic excludes the highest (maximum value) pixel inside the region. Use this method to avoid a biased result when the region is known to contain one deviant, high pixel value.
Suppose a CImage named I and a CRect named R exist. The following script fragment returns the mean value inside a rectangle on the image, discarding the 1 highest pixel value:
|
-- create a CStats object |
|
-- specify CImage and CRect to measure |
|
-- returns the mean value |
|
-- list the result |
|
-- when done with S, remove it from memory |