MathFunction method (Main Control)

C++ Builder example

Delphi example

 

Builder Syntax

int MathFunction(unsigned uMType, unsigned uFactor);

Delphi Syntax

Function MathFunction (uMType: L_UINT; uFactor: L_UINT): L_INT;

Overview

Refer to Changing Brightness and Contrast

Remarks

Re-maps the image colors according to a mathematical function such as: square, log, square root, sine and cosine.

This method uses the RGB color space.

This method makes it possible to apply one of five mathematical functions to a bitmap’s pixel values: square, square root, log, sine and cosine.

Select the mathematical operation to be performed on each pixel’s values with the uMType parameter. The resulting values are multiplied by the factor uFactor. The uFactor parameter can be any value greater than 0. It is divided internally by different amounts, according to the type of the method being used.

If the bitmap has a region, the effect will be applied on the region only.

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

This method does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this method.

See Also

Elements:

AddBitmaps method, Combine method, AddShadow method, ChangeHueSatInt method, ColorReplace method, DirectionEdgeStatistical method, GetStatisticsInfo method, GetObjectInfo method, RevEffect method, Segment method, SubtractBackground method, UserFilter method.

Topics:

Raster Images: Modifying Intensity Values