TIEVisionImage.addWeighted
Declaration
procedure addWeighted(alpha: double; rhs: TIEVisionImage; beta: double; gamma: double; dest: TIEVisionImage); overload; safecall;
Description
Calculate the weighted sum of two images, executing: dest = this*alpha + rhs*beta + gamma
Parameter | Description |
alpha | Weight for the first image pixels |
rhs | Second source image of the same size and channel number |
beta | Weight for the second image pixels |
gamma | Scalar added to each sum |
dest | Container for the resulting image |
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
ImageEnView1.IO.LoadFromFile( 'D:\im300a.jpg' );
ImageEnView2.IO.LoadFromFile( 'D:\im300b.jpg' );
DestIEViewer1.IEBitmap.Allocate( ImageEnView1.IEBitmap.Width, ImageEnView1.IEBitmap.Height );
ImageEnView1.IEBitmap.GetIEVisionImage().addWeighted( 0.7, ImageEnView2.IEBitmap.GetIEVisionImage(), 0.3, 0, DestIEViewer1.IEBitmap.GetIEVisionImage() );
DestIEViewer1.Update();