Image: Adjustments: Function LUT
Apply lookup table function to image
This feature is for OriginPro only.
1. imgFuncLUT img:=1 fact:=10 oimg:=2;
2. imgFuncLUT img:=[Mbook1]Msheet1!mat(1) fact:=50 func:=ln channel:=green;
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 is the active image. |
Factor | fact |
Input int |
|
Specifies the factor used to create the lookup table. |
Function | func |
Input int |
|
Specifies the function used to create the lookup table.
|
Channel | channel |
Input int |
|
Specifies the color channel to apply the lookup table function.
|
Output Image | oimg |
Output Image |
|
Specifies the output image. By default, the output image is the input image. See the syntax here. |
Look Up Table | lut |
Output vector |
|
Specifies the lookup table output, which is a single-column table that contains the lookup values.
|
This X-Function can be used to change the color values in a specified color channel (RGB, R, G, or B) so as to enhance the color of the input image. The color change is based on a lookup table, which maps the original color values into new color values. The lookup table is generated using a function and a factor specified by user. Currently, three functions are available:
Additionally, the Lookup Table includes an option to save the lookup table data.
In the following example, we use 50 as Factor and select Ln Function to apply the LUT function to the green channel:
OriginPro includes the ability to automatically recalculate the analysis results of the Lookup Table operation any time you change the parameters or update your source data. In addition, the settings for this analysis routine can be saved to an analysis theme for use later with similar data.
When different functions are chosen, the lookup tables are generated in different ways.
If the exponential function is selected, the lookup table is calculated with the following equation:
where
If the Ln function is selected, the lookup table is calculated with the following equation:
where:
If the sigmoid function is selected, the lookup table is calculated with the following equation:
where:
The creation of the LUT uses L_GetFunctionalLookupTable() function from LEADTOOLS Main API. And the remapping of the intensities is based on L_RemapBitmapIntensity() function from LEADTOOLS Main API. Please refer to the LEADTOOLS Main API Help file, Version 14 and read the L_GetFunctionalLookupTable topic and the L_RemapBitmapIntensity topic for more information.
LEADTOOLS Main API Help file, Version 14