Updates a range of entries in the lookup table, based on the specified mathematical function.
lookupTable
Lookup table array to be filled by this method. The user must set the first and the last element of the lookup table manually (i.e. lookupTable[0] = firstValue; lookupTable[tableSize - 1] = lastValue;), if you set the first element to last value and the last element to the first value then the lookup table will become inverted.
start
Index of the first entry in the lookup table to update. The indices of the table correspond to the intensity values. If this parameter has a negative value the corresponding index to lookupTable is equal to its value + its length. The range of its possible value is between (- lookupTable length/2) and ( lookupTable length/2 - 1).
end
Index of the last entry in the lookup table to update. The indices of the table correspond to the intensity values. If this parameter has a negative value the corresponding index to lookupTable is equal to its value + its length. The range of its possible value is between (- lookupTable length/2) and ( lookupTable length/2 - 1).
factor
Value that indicates the factor to be applied in the function operation specified in the flags parameter. This parameter is used only if flags is set to FunctionalLookupTableFlags.Exponential, FunctionalLookupTableFlags.Sigmoid or FunctionalLookupTableFlags.Logarithm. If FunctionalLookupTableFlags.Exponential or FunctionalLookupTableFlags.Sigmoid is set, the value of this parameter can be any integer (+/-). If FunctionalLookupTableFlags.Logarithm is set, its value should be >= 0. However, if factor = 0, the lookup table will be filled linearly from start to end, regardless of the value set in flags.
flags
Flags that indicate the function used to update the lookup table and whether or not the lookupTable should contain signed or unsigned data.
Y |
|
|
|
|
|
Y |
|
|
|
|
|
Y |
|
|
|
|
|
If the flags parameter is set to FunctionalLookupTableFlags.Linear, factor is ignored. The method performs a linear interpolation between the two points (start, YStart) and (end, YEnd) and stores the results in the lookup table.
where:
YStart = The lookupTable value at start.
YEnd = The lookupTable value at end.
If the value of (end - start) exceed the lookupTable length, the method will throw an exception.
To accomplish this, the user would proceed by doing the following:
Store the new intensity value in the Lookup table by assignment: lookupTable[0] = 0; lookupTable[x] = newIntensity;
Call GetFunctionalLookupTable with start set to 0, end set to x, and flags set to FunctionalLookupTableFlags.Linear.
This example will darken the loaded image by using a lookup table created by using an exponential function.
Products |
Support |
Feedback: GetFunctionalLookupTable Method - Leadtools.ImageProcessing.Effects |
Introduction |
Help Version 19.0.2017.3.21
|