Download Print this page

Parallax TSL1401-DB Instructions Manual page 17

Linescan camera module

Advertisement

1
2
3
4
0
1
All light/dark thresholding takes place using the values of the 255 real and interpolated pixels, yielding
255 bits of data, whose positions are numbered 1 through 255. (Note: This one-based numbering is
different from that of the direct BS2 numbering shown earlier. That was zero-based to conform with
PBASIC's zero-based subscript conventions.) Binary pixel 0 is non-existent in this system and is used in
the context of image analysis to indicate "feature not found".
Conversion from gray-level to binary pixels always uses two thresholds for each pixel. Normal, compare-
to-level thresholding treats the area between the two thresholds as a "hysteresis band". In order to
transition from dark to light, a pixel must attain a light level above the upper threshold. To transition
from light to dark, a pixel's level must sink below the lower threshold. Excursions into and out of the
hysteresis band, without crossing it completely, will not result in a dark-to-light or light-to-dark transition.
This helps to eliminate "hair trigger" transitions when the level is near threshold. (Of course, if this is
what you want, you can always set the hysteresis value to zero.) This kind of comparison is illustrated in
the above diagram by the color of the dots.
The firmware also supports "window" comparisons, in which values inside the hysteresis band evaluate to
zero; those above or below, to one. This is useful for determining how much a subject's light intensity
deviates from an acceptable range of levels, for example.
Thresholds can also be either "fixed", as the example above illustrates, or "floating". A floating threshold
follows the contour of the pixel response as a kind of moving average whose filter constant is
programmable. This can be handy for thresholding subjects whose illumination is uneven. It also allows
the detection of extreme edges, while ignoring gently rising or falling light levels. The screen shots below
illustrate this:
© Bueno Systems, Inc. • TSL1401-DB (2009.10.01)
Binary Pixel Numbers
5
6
7
8
9
10
11
2
3
4
Gray-level Pixel Numbers
245
246
247
248
249
5
122
123
124
250
251
252
253
254
255
125
126
127
Page 17 of 52

Advertisement

loading