CStats:GeometricMean and CStats:GeometricMeanSdev
The GeometricMean method computes the geometric mean value that assigns lower weight to deviant pixels. The name GeoMean is an alias for this method.
nMean = CStats:GeometricMean( CImage, CRect ) nMean = CStats:GeometricMean( CImage ) nMean = CStats:GeometricMean( table ) nMean, nSdev = CStats:GeometricMeanSdev( CImage, CRect ) nMean, nSdev = CStats:GeometricMeanSdev( CImage ) nMean, nSdev = CStats:GeometricMeanSdev( table ) |
The CRect is a bounding rectangle for the CImage object.
table must be a 1-dimensional array containing numbers.
On success, returns the geometric mean value and standard deviation.
On failure, returns 0, 0.
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 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 class, CImage class, CRect class, Mean, SigmaClipMean , ContraMean , YpMean
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.