CStats:AlphaClipMean and CStats:AlphaClipMeanSdev
The AlphaClipMean method computes the mean value after rejecting the nHigh highest and nLow lowest values from the sample. This method uses the same algorithm as the AlphaClip method of the CImCombine class.
|
nMean = CStats:AlphaClipMean( CImage, nHigh, nLow, CRect ) nMean = CStats:AlphaClipMean( CImage, nHigh, nLow ) nMean = CStats:AlphaClipMean( CPlotView, nHigh, nLow ) nMean = CStats:AlphaClipMean( table, nHigh, nLow ) |
|
nMean, nSdev = CStats:AlphaClipMeanSdev( CImage, nHigh, nLow, CRect ) nMean, nSdev = CStats:AlphaClipMeanSdev( CImage, nHigh, nLow ) nMean, nSdev = CStats:AlphaClipMeanSdev( CPlotView, nHigh, nLow ) nMean, nSdev = CStats:AlphaClipMeanSdev( table, nHigh, nLow ) |
CRect is a
bounding rectangle for the CImage
object.
CPlotView
is a plot window containing data.
nHigh and
nLow specify the number of values to
reject from the calculation.
table is a
1-dimensional array containing numbers.
On
success, returns the alpha clipped mean value and standard
deviation.
On
failure, returns 0, 0.
The calculated statistic excludes a specified number of lowest and highest values from the sample. The parameters n and m are known as "alpha" values. In comparison, the MinMaxClippedMean method uses the alpha values 1,1. For example, if nLow=10 andnHigh=20 , then the 10 lowest and 20 highest values in the sample are rejected from the mean value calculation.
When a CPlotView is passed, only the current CPlot buffer is processed.
Suppose a CImage named I and a CRect named R exist. The following script returns the alpha-clipped mean value inside a rectangle on the image:
|
|
-- create a CStats object |
|
-- CImage and CRect to be measured |
|
|
|
-- return the mean value |
|
|
-- list the result |
Mira Pro x64 Script User's Guide, v.8.80 Copyright Ⓒ 2025
Mirametrics, Inc. All Rights Reserved.