|
CStats:MinPix
The MinPix method returns the pixel
coordinates of the minimum value for a data object.
Syntax
|
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.
Example
Suppose a
CImage I and a
CRect R exist. The
following script returns the location of the minimum value inside a
rectangle:
|
S = new_stats()
|
|
|
|
|
|
x, y = S:MinPix(I,
R)
|
|
|
Printf("Min at %d,&d\n", x,
y )
|
|
|
S:delete()
|
|
Related Topics
CStats class
Min
MaxPix
CImage class
CRect class
Mira Pro x64 Script User's Guide, v.8.76 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.
|