AddWeightedBitmaps method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

int AddWeightedBitmaps(HBITMAPLIST hList, L_PUINT puFactor, unsigned uFlags);

Delphi Syntax

Function AddWeightedBitmaps (hList: HBITMAPLIST; puFactor: L_PUINT; uFlags: L_UINT): L_INT;

Overview

Refer to Removing Noise.

Remarks

Adds or averages the bitmaps in the specified list according to their weight factors.

This method can be used to modify the brightness (with the add operations) or remove the noise (with the average operations). Typically, you would call this method for a series of images taken of the same object at short intervals.

If uFlag is BC_ADD, the method can be used to add several images of the same view to improve the lightness or brightness of the image. In this case, puFactor is ignored.

If uFlag is BC_AVG, the method can be used to average several images. In this case, puFactor is ignored.

If uFlag is BC_ADDWEIGHTED, the method can be used to obtain an image as the sum of several weighted images. Each bitmap in any position in the list has a corresponding weight factor in the same position in the puFactor array. The real values are the weight factors divided by 100. For example if a weight factor is 131 its real value is 1.31. If puFactor equals NULL, each bitmap has the same weight factor of 100 and the result is the same as for BC_ADD.

If uFlag is BC_AVGWEIGHTED, the method can eliminate random noise by performing a weighted average. Each bitmap in any position in the list has a corresponding weight factor in the puFactor array. The real values are the weight factors in the array divided by 100. The weighted sum will be divided by the sum of the weights. If puFactor equals NULL, each bitmap has the same weight factor of 100 and the result is the same as for BC_AVG.

This method performs operations between data byte-by-byte. An image can be any color resolution. The resulting image of this operation will be the active Bitmap in LEAD Main control. The operations are performed based on the smallest width and height of the input images.

This method supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available only in the Document/Medical toolkits.

See Also

Elements:

AddBitmaps method, Underlay method, Combine method

Topics:

Raster Images: Combining Images

 

Raster Images: Modifying Intensity Values

 

Changing Brightness and Contrast