Download Print this page

Parallax TSL1401-DB Instructions Manual page 30

Linescan camera module

Advertisement

Acquiring an Image
Image acquisition is done using the various acquire commands, each having the same general format:
They all take no arguments and come in eight flavors, which are described in the table below:
Command
Value
ACQGRAY
$A0
ACQBIN
$A4
ACQAND
$A1
ACQOR
$A2
ACQXOR
$A3
ACQORNOT
$A5
ACQANDNOT
$A6
ACQXORNOT
$A7
Two additional constants are defined in the code template: ACQDIFF, which is a pseudonym for
ACQXOR, and ACQSAME, which is a pseudonym for ACQXORNOT. These pseudonyms reflect the use
of these two commands, which is to find pixels which are either different from, or the same as, pixels
from the previous acquisition.
Although the acquire commands do not take an argument, there is one optional modifier that can be
ORed to it. This is the external trigger constant, XTRIG, which has a value of $08. When XTRIG is
ORed to any acquire command, the command, when executed, will wait for a falling edge on BASIC
Stamp pin P3, then begin its exposure. Since P3 is common to both daughterboard sockets, this same
pin triggers the TSL1401-DB in either one. This enables exposures to be synchronized precisely with an
external event, such as an encoder pulse or optosensor output.
Note: When the driver firmware is waiting for an external pulse on P3, it is not possible to reset it using
the OWOUT statement's reset pulse. However, you can force an exposure by pulling P3 low momentarily
with the following PBASIC code sequence:
LOW 0 : INPUT 0
Note that P3, like P2, should not be driven high. The MoBoStamp-pe includes pull-ups for this purpose,
allowing bussed open-collector drivers to actuate it by pulling it down.
© Bueno Systems, Inc. • TSL1401-DB (2009.10.01)
Acquire
Acquire|XTRIG
Acquire a binary image, while dumping all 128 grayscale pixel values.
Acquire a binary image, replacing the previously-acquired image.
Acquire a binary image, ANDing the binary pixels with the previous image.
This can be used to track which bright pixels are common to all successive
scans.
Acquire a binary image, ORing the binary pixels with the previous image.
This can be used to track which bright pixels appear in one or more
successive scans.
Acquire a binary image, XORing the binary pixels with the previous image.
This can be used in successive pairs to see which pixels change between
them (useful for motion detection).
Acquire a binary image, ORing the binary pixels with the NOT of the previous
image. This reveals only those pixels that
scans.
Acquire a binary image, ANDing the binary pixels with the NOT of the
previous image. This reveals only those pixels that
pairs of scans.
Acquire a binary image, XORing the binary pixels with the NOT of the
previous image. This can be used in successive pairs to see which pixels
remain the same between them.
Description
become
dark betweens pairs of
become
bright between
Page 30 of 52

Advertisement

loading