Specifications

Histogram, Threshold, and Compare Functions
10-5
10
Lookup Table (LUT) and Histogram Operations
A LUT can be used to specify an intensity transformation. Given an input
intensity, LUT can be used to look up an output intensity. Usually a LUT is
provided for each channel in the image, although sometimes the same LUT
can be shared by many channels.
The IplLUT Structure
You can set a lookup table using the IplLUT structure. The C language
definition of the
IplLUT structure is as follows:
IplLUT Structure Definition
typedef struct _IplLUT {
int num; /* number of keys or values */
int*
key
;
int*
value
;
int*
factor
;
int
interpolateType
;
} IplLUT;
The
key
array has the length
num
;the
value
and
factor
are arrays of the
same length
num
-1.The
interpolateType
can be either
IPL_LUT_LOOKUP or IPL_LUT_INTER.
Consider the following example of
num
=4:
key value factor
k0 v0 f0
k1 v1 f1
k2 v2 f2
k3