User manual

Table Of Contents
Small Vision System User Manual 52
There are three main classes for SVS: classes that encapsulate stereo images, classes that produce the
images from video or file sources, and classes that operate on stereo images to create disparity and 3D
images. These classes are displayed in Figure 5-1. The header file is
src/svsclass.h.
The basic idea is to have one class (
svsStereoImage) for stereo images and the resultant disparity
images, which performs all necessary storage allocation and insulates the user from having to worry about
these issues. Stereo image objects are produced from video sources, stored image files, or memory buffers
by the
svsAcquireImages classes, which are also responsible for rectifying the images according to
parameters produced by the calibration routines. Disparity images and 3D point clouds are produced by
the stereo processing class
svsStereoProcess acting on stereo image object, with the results stored
back in the stereo image object. Finally, display classes allow for easy display of the images within a GUI.
Figure 5-2 shows a simple example of using the classes to produce and display stereo disparity results.
The full program example is in
samples/stframe.cpp. The basic operations are:
1. Make a video source object and open it. Which video source is used depends on which
framegrabber interface file has been loaded: see Section 2.1.2.
2. Make a stereo processing object for producing disparity results from a stereo image.
3. Make some display window objects for displaying images and disparity results.
4. Open the video source.
5. Set the frame size and any other video parameters you wish, and read in rectification
parameters from a file.
6. Start the video acquisition.
7. Loop:
a. Get the next stereo image.
b. Calculate disparity results.
c. Display the results.
Image source
classes
Stereo Image and
Parameter classes
Stereo Processing
classes
Display classes
svsAcquireImages
svsVideoImages
svsFileImages
svsStereoImage
svsImageParams
svsRectParams
svsDistParams
svsStereoProcess svsWindow
svsGLWindow
svsDebugWin
Figure 5-1 SVS C++ Classes