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, smooth, filter2D, pyrDown, pyrUp

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 ); // ImageEnView1.IEBitmap
ImageEnView1.Update();



Examples


ImageEnView1.IEBitmap.AssignIEVisionImage(ievisionImage);
ImageEnView1.Update();

// 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 );
ImageEnView1.Update();


See Also


- GetIEVisionImage
- TIEVisionImage