CStats:AlphaClipMean and CStats:AlphaClipMeanSdev
The AlphaClipMean method computes the mean value after rejecting the nHigh highest and nLow lowest values from the sample.
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.
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 alpha values of 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, the only the current CPlot is processed.
This method uses the same algorithm as the AlphaClip method of the CImCombine class.
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 |
CStats class, CImage class, CRect class, MinMaxClipMean, SigmaClipMean, RankClipMean, MtmSigmaClipMean
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.