ImageEn, unit ievision

TIEVisionImage.minMax

TIEVisionImage.minMax


Declaration

procedure minMax(out minVal: double; out maxVal: double); overload; safecall;
procedure minMax(out minVal: double; out maxVal: double; out minLoc: TIEVisionPoint; out maxLoc: TIEVisionPoint); overload; safecall;
procedure minMax(out minVal: double; out maxVal: double; out minLoc: TIEVisionPoint; out maxLoc: TIEVisionPoint; mask: TIEVisionImage); overload; safecall;


Description

Find the global minimum and maximum in a whole image or sub-image.

Parameter Description
minVal Output for minimum value
maxVal Output for maximum value
minLoc Minimum value location
maxLoc Maximum value location


Demo

Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr


Example

// Find minimum and maximum point of the image
ImageEnView1.IEBitmap.GetIEVisionImage().minMax( minVal, maxVal, minLoc, maxLoc );
ShowMessage( Format( 'Min: %d at %d,%d. Max: %d at %d,%d', [ Round(minVal), minLoc.x, minLoc.y, Round(maxVal), maxLoc.x, maxLoc.y ]));