CStats:Median
The Median method computes the median value inside a rectangular region of the image. The rectangle and image must have been previously initialized for the CStats object.
nValue, Sdev = CStats:Median() |
Suppose a CImage named I and a CRect named R exist. The following script fragment returns the median inside a rectangle on the image:
|
-- create a CStats object |
|
-- specify CImage and CRect to measure |
|
-- returns the median |
|
-- list the results |
|
-- when done with S, remove it from memory |