User manual
Table Of Contents
- Introduction
- Getting started with smallv
- Stereo Geometry
- Calibration
- API Reference – C++ Language
Small Vision System User Manual 63
5.7 File and Memory Acquisition
The file and memory acquisition classes are subclasses of svsAcquireImages. This classes are
used to input stereo images from files, or from arrays in memory, and present them for processing. Users
who have their own stereo devices, and acquire images into memory, can use these classes to perform
stereo processing with the SVS libraries.
While images are not streamed from files in the same way as from a video source, the function calls
are similar. After opening the file,
Start() and then GetImage() function is called to retrieve the
stored image. A single image file set is repeatedly opened and read in by successive calls to
GetImage().
A file sequence consists of file sets whose basenames end in a 3-digit number. Opening a file set that
is part of a sequence causes the rest of the sequence to be loaded on successive calls to GetImage().
5.7.1 File Image Object
svsFileImages()
~svsFileImages()
Constructor and destructor for the file acquisition object.
5.7.2 Setting Images from Files
bool Open(char *basename)
bool ReadFromFile(char *basename)
bool Close()
The
Open() function opens a file set and reads it into the object; see Section 2.2.2 for information
about file sets. The file set can include calibration parameters that describe the rectification of the images.
Another file can be read into the file object using the
ReadFromFile() function. The new images
replace the old ones.
The file is closed with the
Close() function.
5.7.3 Stored Image Object
svsStoredImages()
~svsStoredImages()
Constructor and destructor for the file acquisition object.
5.7.4 Setting Images from Memory
bool Load(int width, int height,
unsigned char *lim, unsigned char *rim,
unsigned char *cim = NULL, unsigned char *cimr = NULL,
bool rect = false, bool copy = false);
The
Load() function sets images from memory into the acquisition object, after which they can be
read out (and optionally rectified) using
GetImage(). The left and right monochrome images must be
loaded; the color images are optional. If the images are already rectified, set
rect to true.
Normally, user images are passed into the acquisition object as pointers; GetImage() will output
these pointers unless rectification is performed. In this case, the object manages and outputs its own
buffers, which the user should not delete.