CStats:MaxPix
The MaxPix method returns the pixel coordinate of the maximum value inside a rectangular region of the image. The rectangle and image must have been previously initialized for the CStats object.
x, y = CStats:MaxPix() |
Suppose a CImage named I and a CRect named R exist. The following script fragment returns the location of the maximum value inside a rectangle:
|
-- create a CStats object |
|
-- specify CImage and CRect to measure |
|
-- get the column and row of the maximum value |
|
-- list the result |
|
-- when done with S, remove it from memory |