User manual

Small Vision System User Manual 45
5.2 Acquiring images from the video capture board
The SVS library includes functions for interfacing to various video capture boards. These functions
are written for each board, to present a standard interface. Several global variables are used to determine
the parameters of video capture.
5.2.1 Video Capture Interface Libraries
Video is captured through a framegrabber, either analog or digital. The framegrabber must be
installed according to instructions for the particular board and OS. For MS Windows, these instructions
come with the framegrabber. In Linux, there are installations for Bt8xx boards, Matrox Meteor boards,
and 1394 digital boards. Links to relevant websites for installation can be found on the Videre Design
website (www.videredesign.com).
Once a framegrabber is installed, SVS can access it via capture interface libraries. To use a particular
interface, it must be copied to bin/svsgrab.so (Linux) or bin/svsgrab.dll and
bin/svsgrab.lib (MS Windows). The following table lists the interface libraries for different
framegrabbers.
5.2.2 Writing a Framegrabber Interface Library
Examples of these libraries are found in src/mswXXX.c and src/lnxXXX.c. Use these
examples as a template for writing a framegrabber interface library for a new framegrabber.
5.2.3 Opening the Capture Device
Before video capture can begin, the video devices must be opened. The video capture parameters are
set via global parameters, and then svsVideoOpen is called.
int svsVideoOpen(svsSP *sp)
Opens the video capture device or devices (depending on svsDualCaptureFormat).
Updates the camera parameters of sp, based on the values assigned by the interface, e.g.,
sets the maximum decimation and binning, whether the cameras have auto gain or auto
white balance, etc.
It is not necessary to have valid values for window size or digitization parameters when the
device is opened. These values must be set before starting the video stream
(svsVideoStartContinuous).
Returns 1 if successful, and 0 if not.
MSW 95/98/2000/NT Imagenation PXC200
mswpxc.dll, lib
Matrox Meteor Standard
Matrox Meteor PPB, RGB
svsmet.dll, lib
Matrox Meteor II
svsmet2.dll, lib
VPP PCMCIA
svsvpp.dll, lib
VFW framegrabber
svsvfw.dll, lib
MSW 98SE/2000 1394 OHCI digital
svspix.dll, lib
Linux Imagenation PXC200
Matrox Meteor Standard
Matrox Meteor PPB, RGB
metcap.so
Linux 2.2.14 and above 1394 OHCI digital
pixcap.so
Table 5-1 Framegrabber interface libraries