ImageEn, unit ievision

TIEVisionImage.min

TIEVisionImage.min


Declaration

procedure min(source1: TIEVisionImage; source2: TIEVisionImage); overload; safecall;
procedure min(source1: TIEVisionImage; source2: double); overload; safecall;


Description

Calculate the per-element minimum of two images or an image and a scalar.

Parameter Description
source1 First source image
source2 Second source image or scalar value

Note:
The source images must be the same size and color depth
You should allocate the destination image to the same size as the source images


Demo

Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr


Example

ImageEnView1.IO.LoadFromFile( 'D:\im300a.jpg' );
ImageEnView2.IO.LoadFromFile( 'D:\im300b.jpg' );
DestIEViewer1.IEBitmap.Allocate( ImageEnView1.IEBitmap.Width, ImageEnView1.IEBitmap.Height );  // Allocate the destination image
DestIEViewer1.IEBitmap.GetIEVisionImage().min( ImageEnView1.IEBitmap.GetIEVisionImage(), ImageEnView2.IEBitmap.GetIEVisionImage() );
DestIEViewer1.Update();

// ALTERNATIVELY...
DestIEViewer1.IO.LoadFromFile( 'D:\im300a.jpg' );
ImageEnView2.IO.LoadFromFile( 'D:\im300b.jpg' );
DestIEViewer1.IEBitmap.GetIEVisionImage().min( DestIEViewer1.IEBitmap.GetIEVisionImage(), ImageEnView2.IEBitmap.GetIEVisionImage() );
DestIEViewer1.Update();