Specifications

Intel
®
Image Processing Library Reference Manual
10-6
10
If
interpolateType
is LOOKUP, then any input intensity D in the range
k0 D<k1will result in the value v0, in the range k1 D<k2will
result in the value v1 andsoon.If
interpolateType
is INTER,thenan
intensity
D in the range k0 D<k1will result in the linearly
interpolated value
v0 + [(v1 – v0)/(k1 – k0)] * (D – k0)
The value (v1-v0)/(k1-k0) is pre-computed and stored as f0 in the array
factor
in the IplLUT data structure, the value (v2-v1)/(k2-k1) is
stored as
f1 and so on. Thus, the actual formula used by library functions
to compute the interpolated value of
D for example in the range
k2 D<k3is as follows:
D’=v2+f2*(D–k2)
Note that to calculate the interpolated value of D in this last interval,
library functions do not need the value
v3, which is used only by the
application to pre-compute the factor
f2 .
The data structure described above can be used to specify a piece-wise
linear transformation that is ideal for the purpose of contrast stretching.
The histogram is a data structure that shows how the intensities in the
image are distributed. The same data structure
IplLUT is used for a
histogram except that
interpolateType
is always IPL_LUT_LOOKUP and
factor
is a NULL pointer for a histogram. However, unlike the LUT, the
value
array represents counts of pixels falling in the specified ranges in
the
key
array.
The sections that follow describe the functions that use the above data
structure.