CStats:MinPix
The MinPix method returns the pixel coordinates of the minimum value for a data object.
x, y = CStats:MinPix( CImage, CRect ) x, y = CStats:MinPix( CImage ) x, y = CStats:MinPix( table ) |
CRect is a bounding rectangle for the CImage object.
table is a 1-dimensional array containing numbers.
x, y are the pixel coordinates of the minimum value, relative to 1,1.
On success, returns x, y coordinates as non-zero.
On failure, returns 0,0.
Suppose a CImage I and a CRect R exist. The following script returns the location of the minimum value inside a rectangle:
|
-- create a CStats object |
-- specify CImage and CRect to measure |
|
|
-- get the column and row of the minimum value |
|
-- list the result |
|
-- when done with S, remove it from memory |
CStats class, Min, MaxPix, CImage class, CRect class
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.