CStats:Min and CStats:MinXy
The Min method computes the minimum value for an array, CImage, or list of numbers. The array and list parameters must contain a mixture of numbers and strings that can be converted to numbers.
nMinValue = CStats:Min( CImage, CRect ) nMinValue = CStats:Min( CImage ) nMinValue = CStats:Min( table ) nMinValue = CStats:Min( n1, n2, n3, ... ) nMinValue, nX, nY = CStats:MinXy( CImage, CRect ) nMinValue, nX, nY = CStats:MinXy( CImage ) nMinValue, nX, nY = CStats:MinXy( table ) nMinValue, nX, nY = CStats:MinXy( n1, n2, n3, ... ) |
CRect is a bounding rectangle for the CImage object.
table is a 1-dimensional array containing numbers.
n1, n2, n3, ... are numbers or string values that can be converted to numbers.
On success, returns the minimum value and the x and y coordinates of the minimum value.
On failure, returns 0, 0, 0.
Suppose a CImage named I and a CRect named R exist. The following script returns the minimum value inside a rectangle on the image:
|
-- create a CStats object |
-- specify CImage and CRect to be measured |
|
|
-- returns the minimum value |
|
-- list the result |
|
-- when done with S, remove it from memory |
CStats class, MinPix, Max, CImage class, CRect class
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.