User Manual - twentynine
The third example, illustrated in Figure 91, shows the inverting of an 8 bit monochrome image by
a LUT. Every input gray level value is transformed into an output gray-level value by the formula
Value
out
=
2
8
−
Value
in
.
0
15
30
45
60
75
90
105
120
135
150
165
180
195
210
225
240
255
0
15
30
45
60
75
90
105 120 135 150 165 180 195 210 225 240 255
v
a
lu
e
index
Input Image
Output Image
index value
0
255
1
254
2
253
…
…
126
129
127
128
128
127
…
…
253
2
254
1
255
0
Figure 91: Inverting a monochrome image using look-up table
The last example demonstrates two implementations of contrast enhancement, using a look-up table applied
to an 8-bit per channel color image. In Figure 92 the first 45 pixel values have been set to 0 and pixel values
in range from 173 to 255 have been set to 255.
Input Image
Output Image
0
15
30
45
60
75
90
105
120
135
150
165
180
195
210
225
240
255
0
15
30
45
60
75
90
105 120 135 150 165 180 195 210 225 240 255
v
a
lu
e
index
index value
0
0
1
0
2
0
…
…
126
162
127
164
128
166
…
…
253
255
254
255
255
255
Figure 92: Enhancing contrast of an image using look-up table
115
SMARTEK Vision | User Manual - twentynine | Doc. v1.0.2