Declaration
procedure cmp(rhs: TIEVisionImage; dest: TIEVisionImage; cmpOp: TIEVisionCmpOp); overload; safecall;
procedure cmp(rhs: double; dest: TIEVisionImage; cmpOp: TIEVisionCmpOp); overload; safecall;
Description
Perform a per-element comparison of two images or an image and scalar value.
Parameter | Description |
rhs | Right-side image to compare |
dest | Container for the results |
cmpOp | Compare operation |
Note:
◼The images being compared must be the same size and color depth
◼You should allocate the destination image to the same size as the compare images
| Demos\ImageEditing\EveryMethod\EveryMethod.dpr |
ImageEnView1.IO.LoadFromFile( 'D:\im.jpg' );
ImageEnView2.IO.LoadFromFile( 'D:\im2.jpg' );
// Allocate destination image
DestIEViewer1.IEBitmap.Allocate( ImageEnView1.IEBitmap.Width, ImageEnView1.IEBitmap.Height );
ImageEnView1.IEBitmap.GetIEVisionImage().cmp( ImageEnView2.IEBitmap.GetIEVisionImage(),
DestIEViewer1.IEBitmap.GetIEVisionImage(),
ievEQUAL );
DestIEViewer1.Update();