
Contents |
Math Function
Perform math function on image pixel values with a factor
This feature is for OriginPro only.
1. imgMathfun mf:=sqrt fact:=1.5;
2. imgMathfun mf:=sin fact:=2 oimg:=mat(2);
3. imgMathfun oimg:=<new>;
| Display Name | Variable Name | I/O and Type | Default Value | Description |
|---|---|---|---|---|
| Input Matrix | img |
Input Image | |
Specifies the input image. The default input is the active image. |
| Function | mf |
Input int | |
Specifies the math function to apply.
|
| Factor | fact |
Input double | |
Specifies the factor, by which the input image will be multiplied before the math function is applied. |
| Output Image | oimg |
Output Image | |
Specifies the output image. By default, the output image is the same as the input image. See the syntax here. |
This function multiplies the pixel values of the input image by a factor and then applies the specified mathematic function on the products. It allows you to remap the pixel values of the images according to the factor and function you choose.
In this example, we use the imgMathfun function to apply cosine function on the input image:

The computation mainly uses L_MathFunctionBitmap() function from LEADTOOLS Main API. Please refer to the LEADTOOLS Main API Help file, Version 14 and read the L_MathFunctionBitmap topic.
LEADTOOLS Main API Help file, Version 14