OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

imgFuncLUT

Contents

Menu Information

Function LUT

Brief Information

Apply lookup table function to image

Additional Information

This 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;

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.


Description

This X-Function can be used to change the color values in a specified color channel 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, which are Exponential, Ln and Sigmoid.

Examples

In the following example, we use 50 as Factor and select Ln Function to apply the LUT function to the green channel:

  1. When the input image is active, choose Image: Adjustments: Function LUT from the menu. This opens the dialog of the X-Function.
  2. In the X-Function dialog, change the settings as the screenshot below and click OK to close the dialog.
    Image:imgFuncLUT_help_English_files_image002.jpg
We can see that the input image is replaced by the modified image and many features in the green channel are improved.
Image:imgFuncLUT_help_English_files_image004.jpg
Image:imgFuncLUT_help_English_files_image006.jpg
Original image
Output image


Algorithm

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:

Image:imgFuncLUT_help_English_files_image008.gif

where

Image:imgFuncLUT_help_English_files_image010.gif

If the Ln function is selected, the lookup table is calculated with the following equation:

Image:imgFuncLUT_help_English_files_image012.gif

where:

Image:imgFuncLUT_help_English_files_image014.gif

If the sigmoid function is selected, the lookup table is calculated with the following equation:

Image:imgFuncLUT_help_English_files_image016.gif

where:

Image:imgFuncLUT_help_English_files_image018.gif

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.

References

LEADTOOLS Main API Help file, Version 14

Related X-Functions

imgHue, imgColorReplace, imgSaturation, imgGamma