CStats:Kurtosis CStats:Mean

CStats:MaxClipMean and CStats:MaxClipMeanSdev


The MaxClipMean method computes the maximum-clipped mean value for a data object, after rejecting the maximum values of the set.

Syntax

nMean = CStats:MaxClipMean( CImage, CRect )

nMean = CStats:MaxClipMean( CImage )

nMean = CStats:MaxClipMean( table )

nMean, nSdev = CStats:MaxClipMeanSdev( CImage, CRect )

nMean, nSdev = CStats:MaxClipMeanSdev( CImage )

nMean, nSdev = CStats:MaxClipMeanSdev( table )

bullet.gif    CRect is a bounding rectangle for the CImage object.

bullet.gif    table is a 1-dimensional array containing numbers.

bullet.gif    On success, returns the max-clipped mean value as a number.

bullet.gif    On failure, returns 0, 0.

Remarks

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.

Example

Suppose a CImage named I and a CRect named R exist. The following script returns the mean value inside a rectangle on the image, discarding the 1 highest pixel value:

S = new_stats()

-- create a CStats object

-- specify CImage and CRect to measure

 

nVal, nSdev = S:MaxClipMeanSdev(I, R)

-- returns the mean value

Printf("mean=%lg +/- %lg\n", nVal, nSdev)

-- list the result

S:delete()

-- when done with S, remove it from memory

Related Topics

CStats class, CImage class, CRect class, MinClipMean, MinMaxClipMean


Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.