ImageEn, unit iexBitmaps

TIEBitmap.AssignIEVisionImage

TIEBitmap.AssignIEVisionImage


Declaration

procedure AssignIEVisionImage(Source: TIEVisionImage);


Description

Copies source IEVision image into current TIEBitmap object, replacing previous image.


About GetIEVisionImage and AssignIEVisionImage

GetIEVisionImage does not create a new image, just embeds a TIEBitmap into TIEVisionImage. In other words, the TIEVisionImage is just a container to the original bitmap, and so most of its methods (and methods of other IEVision classes) will change the original bitmap, e.g. ImageEnView1.IEBitmap.GetIEVisionImage.setZero(); will clear the TIEBitmap of TImageEnView..

Some methods, however, cannot use the original image for output (e.g. because a larger image is needed), so the contained image is replaced with a new one (and the original bitmap will not reflect the changes). In this case, TIEBitmap.assignIEVisionImage can be used to update the original bitmap.
This affects the following methods: resize, makeBorder, filter2D, pyrDown, pyrUp

Note: If attached to a TImageEnView, it will automatically call Update

Examples:

Img1 := ImageEnView1.IEBitmap.GetIEVisionImage;
Img1.setZero();    // ImageEnView1.IEBitmap will be cleared, assignIEVisionImage is not needed
ImageEnView1.Update();

Img1 := ImageEnView1.IEBitmap.GetIEVisionImage;
Img1.makeBorder( 50, 50, 50, 50, ievBORDER_CONSTANT, IEVisionScalar(255, 0, 0 ));
ImageEnView1.IEBitmap.assignIEVisionImage( Img1 );



Examples

ImageEnView1.IEBitmap.AssignIEVisionImage(ievisionImage);

// Add blue border to image
Img1 := ImageEnView1.IEBitmap.GetIEVisionImage;
Img1.makeBorder( 20, 20, 20, 20, ievBORDER_CONSTANT, IEVisionScalar( 255, 0, 0 ));
ImageEnView1.IEBitmap.assignIEVisionImage( Img1 );


See Also

GetIEVisionImage
TIEVisionImage