lvstereo(3)

LIBRARY ROUTINE
lvstereo - Computes the depth in a matched pair of stereo image

LIBRARY CALL
#include "vinclude.h"
int lvstereo(image,output,focal,length,height,dist,max_dist)
struct xvimage *image, *output;
float focal,length,height,dist,max_dist;

INPUT

OUTPUT

MODIFICATIONS

DESCRIPTION

vstereo analyzes an image produced by the routine vrmatch and produces an image in which the pixel value correspond to its distance from the camera

Vstereo needs to know the following parameters:

    The Focal Length of the Camera.

    The Length of the image inside the camera (CCD matrix)

    The Height of the image inside the camera (CCD matrix).

    The distance of the two camera (left and right).

    The distance that can be considered as the background.

The Algorithm works this way:

First of all, the input image contains region based segmentated images with the image from the left camera on the left side and the right one on the right side.

In both the left and right images, the regions that have been matched have the same label (label number starting at 1).

Then the process will compute the centroid of these regions then computes the depth from the left and right centroid (cf Stereo formulas at the end of this description).

The principle remains simple and gives accurate results if the labelling process gives a precise location of the border of the region in both left and right images.

A problem can happened if the region if not entirely in the image because then the position of the centroid will not be accurate.

Another problem that happened is that sometimes, the result obtained are not accurate enough to keep them. In this case the distance of the object from the camera will be set to 0. This way we can give the original image and the result one to another stereo algorithm based on a different approach (contour matching or point to point correspondance) and improved the information in the entire distance image.

The last comment will be about the background distance that the user has to give in the command line or the graphic interface. This value defines the distance over which the result doesn't matter anymore. Whatever will be further than this limit will automatically be set to the background. In robotics for example, you want to be abble to say to the robot that something is at a distance less then 2 meters from the camera, but you don't care about things that are further than that distance.

STEREO formulas.

    x (left image)/focal length = X (real world) / Z (real world)

    x (right image) / focal =(X - distance cameras)/ Z (real world)

    Z (real world) = /x_left - x_right / distance_cameras * focal_length Copyright 1990, University of New Mexico.

SEE ALSO
vstereo(1), intro(3), vipl(3), verror(3), vutils(3)

RESTRICTIONS

AUTHOR
Pascal Adam

COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.