User manual

Small Vision System User Manual 47
All of the frame size parameters should be set after opening the stereo head with svsVideoOpen,
and before returning a video stream with svsVideoStartContinuous. Setting the size parameters
during streaming video will have no effect, until the streaming is stopped and
svsVideoStartContinuous is called again. The exceptions are the offset and vergence of a
subwindow, and color information, which can be changed during video streaming.
int max_linelen
int max_lines
int subwindow
These parameters are filled in by the framegrabber interface, and should not be changed by
the user. They specify the maximum available height and width from the stereo cameras, in
pixels. The subwindow flag is 1 if subwindowing of the image is available in hardware,
and 0 if not.
int linelen, lines
int width, height
int ix, iy
int vergence
linelen and lines specify the current width and height of the full-frame image available
from the cameras. This will not necessarily be the same as max_linelen and
max_lines, since the available images may be downsampled. For example, an NTSC
analog framegrabber allows for an arbitrary downsampling from 640x480.
height and width are the size of the image currently returned from the cameras.
Normally, these will be the same as linelen and lines, unless the cameras support
subwindow mode; NTSC analog framegrabbers do not, but the MEGA-D digital stereo head
does.
To set up a subwindow with the MEGA-D digital head, set the window size with
svsVideoSetSize to be less than the full-frame size for the sampling mode. For example, if
there is no subsampling, then setting a window size of 640x480, for example, will return a
640x480 subwindow of the full 1288x1032 image.
ix an iy are the subwindow offsets from the upper left corner of the image, in pixels. If
subwindowing is not used, they will be zero. The values for these parameters are limited by
the values of the subwindow width and height relative to the full-frame size.
Electronic vergence allows the stereo head to keep near objects centered in both images.
Vergence can be performed in subwindow mode by setting a differential between the X
offsets of the images. vergence is specified in pixels, and is accomplished in the MEGA-
D by offsetting the right image subwindow further to the right.
int svsVideoSetOffsets(svsSP *sp)
Checks the subwindow offsets and vergence in sp, and if any of them have changed since
the last call to this function or to svsVideoStartContinuous, it updates them on the
stereo hardware. Returns 0 if the call succeeds, -1 if not.
int max_decimation
int max_binning
These parameters indicate the maximum decimation and binning values supported by the
cameras. They are set by the interface during svsVideoOpen, and should not be changed
by the user.