User manual

Small Vision System User Manual 55
void svsCalcConfidence(unsigned char *dest, unsigned char *il,
svsSP *sp)
Compute the confidence and return it in dest. See svsCalcStereo for a description
of the various arguments.
5.5.5 3D Reconstruction
There are two functions for reconstructing points in 3D from (x, y) locations in the left image and
their disparity values. The difference between the two is a trade off between accuracy and speed, with the
first being more accurate but slower. All returned values are in millimeters.
void svsReconstruct3D(float *X, float *Y, float *Z,
float x, float y, float disp, svsSP *sp)
Reconstructs point (x, y, disp) in left rectified image, returning 3D point (X, Y, Z) in left
camera coordinate system. Reconstruction is performed by least squares ray intersection, so
it is slow but well behaved.
void svsReconstruct3DFast(float *X, float *Y, float *Z,
float x, float y, float disp, svsSP *sp)
Reconstructs point (x, y, disp) in left rectified image, returning 3D point (X, Y, Z) in left
camera coordinate system. Reconstruction is fast, but sensitive to the stereo rig getting out of
calibration.
width
height
Left
intensity
image
width
height
Disparity
image
Dest
image
RESTOP(sp)
RESLEFT(sp)
RESLEN(sp)
RESWIDTH(sp)
Figure 5-1 Spatial placement of the disparity image relative to the left input image.