| 2.6.1.7 imgFuncLUT(Pro)Menu InformationImage: Adjustments: Function LUT
 Brief InformationApply lookup table function to image
 Additional InformationThis feature is for OriginPro only.
 Command Line Usage
 1. imgFuncLUT img:=1 fact:=10  oimg:=2;
 2. imgFuncLUT img:=[Mbook1]Msheet1!mat(1) fact:=50 func:=ln channel:=green;
 
 X-Function Execution OptionsPlease refer to the page for additional option switches when accessing the x-function from script
 Variables
| Display Name
 | Variable Name
 | I/O and
 Type
 | Default Value
 | Description |  
| Input Matrix | img | Input
 Image
 | <active> | Specifies the input image. The default is the active image.
 |  
| Factor | fact | Input
 int
 | 0 | Specifies the factor used to create the lookup table.
 |  
| Function | func | Input
 int
 | exp | Specifies the function used to create the lookup table.
Option list
 E:Exp
Exponential function
L:Ln
Ln function
S:Sigmoid
Sigmoid function
 |  
| Channel | channel | Input
 int
 | rgb | Specifies the color channel to apply the lookup table function.
Option list
 RGB:RGB
All channels
R:Red
Red channel
G:Green
Green channel
B:Blue
Blue channel
 |  
| Output Image | oimg | Output
 Image
 | <input> | Specifies the output image. By default, the output image is the input image.
See the syntax here.
 |  
| Look Up Table | lut | Output
 vector
 | <new> | Specifies the lookup table output, which is a single-column table that contains the lookup values.
 
 |  DescriptionThis 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.
 
 
 ExamplesIn the following example, we use 50 as Factor and select Ln Function to apply the LUT function to the green channel:
   When the input image is active, choose Image: Adjustments: Function LUT from the menu. This opens the dialog of the X-Function.  In the X-Function dialog, change the settings as the screenshot below and click OK to close the dialog.
 
 We can see that the input image is replaced by the modified image and many features in the green channel are improved.
 
|   |   |  
| Original image | Output image | 
 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.
 AlgorithmWhen 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.
 ReferencesLEADTOOLS Main API Help file, Version 14
 Related X-FunctionsimgHue, imgColorReplace, imgSaturation, imgGamma
 |