Image: Arithmetic Transform: Math Function
Perform math on image pixel values
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>;
Please refer to the page for additional option switches when accessing the x-function from script
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. For Square, Log and Square Root operators, the output image will be multiplied by the factor after the math function applied, i.e., oimg = fact*Func(img); For sine and cosine operators, the factor is multiplied before math function applied, i.e., oimg = Func(fact*img). |
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. |
Below is an example where the Math Function tool has been used to apply the Cosine function with a factor of 30.
Note: OriginPro includes the ability to automatically recalculate the analysis result of the Math Function operation any time you change the parameters or update your source data. In addition, the settings for the analysis routine can be saved to an analysis theme for use later with similar data.
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