User manual
Table Of Contents
- Introduction
- Getting started with smallv
- Stereo Geometry
- Calibration
- API Reference – C++ Language

Small Vision System User Manual 61
a number can be used, giving the device in the order returned by the Enumerate() function, i.e., 1is the
first device, 2 is the second, and so on. A value of 0 indicates any available device.
Upon opening, the device characteristics are set to default values. To set values from a parameter file,
use the
ReadParams() function.
A stereo device is closed and released by the Close() call.
5.6.4 Image Framing Parameters
bool SetSize(int w, int h)
bool SetSample(int decimation, int binning)
bool SetRate(int rate)
bool SetOffset(int ix, int iy, int verge)
bool SetColor(bool on, bool onr = false)
bool CheckParams()
See Sections 2.1.4, 2.1.5, and 2.1.6 for more information on frame sizes and sampling modes.
These functions control the frame size and sampling mode of the acquired image.
SetSize(w,h)
sets the width and height of the image returned by the stereo device. In most cases, this is the full frame of
the image. For example, most analog framegrabbers perform hardware scaling, so that almost any size
image can be requested, and the hardware scales the video information from the imager to fit that size. In
most analog framegrabbers, the sampling parameters (decimation and binning) are not used, and a full-
frame image is always returned, at a size given by the
SetSize() function.
The digital stereo devices allow the user to specify a desired frame rate. Typically the device defaults
to the fastest frame rate allowed, and the application can choose a different one to minimize bus traffic.
The MEGA-D and Dual-DCAM have different interpretations of the frame rate parameter; see Table
5-1below.
Some stereo devices, such as the MEGA-D, allow the user to specify a
subwindow within the image
frame. The subwindow is given by a combination of sampling mode and window size. The sampling
mode can be specified by
SetSample(), which sets binning and decimation for the imager. The
MEGA-D supports sub-sampling the image at every 1, 2 or 4 pixels; it also supports binning (averaging) of
1 or 2 (a 2x2 square of pixels is averaged). For example, with binning =2 and decimation = 2, the full
frame size is 320 x 240 pixels. Using
SetSize(), a smaller subwindow can be returned. The offset of
the subwindow within the full frame comes from the SetOffset() function, which specifies the upper
left corner of the subwindow, as well as a
vergence between the left and right images.
SetColor() turns color on the left image on or off. Additionally, some applications require color
from the right imager also, and setting the second argument to true will return a color image for the right
imager. Generally, returning color requires more bus bandwidth and processing, so use color only if
necessary.
The video frame parameters can be set independently, and not all combinations of values are legal.
Device Rate
Parameter
Frame
Rate
0, 1 Normal
2 Normal / 2
3 Normal / 3
MEGA-D
4 Normal / 4
30 30 Hz
15 15 Hz
Dual-
DCAM
7 7.5 Hz
Table 5-1 Frame rates as a function of the SetRate() parameter. MEGA-D frame rates are
determined from the base rate by clock division. Dual-DCAM rates are determined directly as
frames/second.