EDT, Inc.
2019 April 29
14
VisionLink F-series
Example and Utility Applications
initcam
Command-line utility that initializes the board and device driver for a specific camera. It initializes board registers; sets
various parameters (width, height, depth, etc.) to specific values; and optionally sends serial initialization commands to
the camera from the referenced configuration file. Configuration files are in your EDT installation package under
camera_config
. The EDT camera selector GUI applications (
vlviewer, pdvshow
) are simply wrappers to provide a
way to select the correct file, then shell out to call
initcam
. To initialize from your own application code, you can use
initcam.c
as example code.
For a detailed description of configuration files and directives, consult the Camera Configuration Guide (see
Several of the most useful options are...
-u
unit
The unit number, if multiple boards are installed; default is 0 (first board).
-c
channel
The channel, on multichannel boards; default is 0 (first channel).
-f
pathname
The (required) name of the configuration file to use for initialization.
For example...
initcam -f camera_config/generic8cl.cfg
take
Used to acquire images and (optionally) save them to files. Though it does not display the images, it does provide many
other options, making it a useful diagnostic tool. The source also shows how to change camera settings such as
integration time; tune image acquisition in certain ways; and detect errors.
Several of the most useful options are...
-u
unit
The unit number, if multiple boards are installed; default is 0 (first board).
-c
channel
The channel, on multichannel boards; default is 0 (first channel).
-b
file
The base name of the file in which to save the image, in Windows bitmap format
for all systems (note
–
in EDT software packages later than 5.3.3.3, this option
always will create files in Windows bitmap format, regardless of which operating
system you are using). If only one image is taken, this is the filename; otherwise a
two-digit number is appended to each file, starting with 00. The appropriate suffix
is automatically added.
-f
file
The name of the file in which to save the image, in raw format. The file includes
only raw image data, with no formatting information.
-l
loopcount
The number of consecutive pictures you wish to take. The default is one.
-N
numbufs
The number of ring buffers (default is 1). A ring buffer is a portion of host memory
preallocated for DMA and used in round-robin fashion. A setting of four optimizes
pipelining
—
one ring buffer currently acquiring data, one ready for data, one
getting ready, and one backup.
-v
Turns on verbose mode. The default is off.
As an example, to acquire 100 images as quickly as possible using four ring buffers, without saving to files, enter...
take -N 4 -l 100
As another example, if you have one VisionLink board connected to two base-mode cameras and you wish
take
to
use the camera on channel 1, enter...
take -u 0 -c 1 -N 4 -l 100