
vstereo(1)                   Khoros                    vstereo(1)

PROGRAM
     vstereo - Computes the depth in a matched pair of stereo
     image

SYNTAX
     vstereo

     -i             Input Matched Image

     -o             Output Depth Image

     [-f]           Focal Length of the Camera

     [-l]           Image Length (CCD Sensor)

     [-h]           Image Height (CCD Sensor)

     [-d]           Camera Displacement on X Axis

     [-z]           Maximum Distance from camera

     [-V]           Gives the version for vstereo

     [-U]           Gives the usage for vstereo

     [-P]           Prompts for command line options

     [-A [file1]]   Creates the answer file called vstereo.ans or
                    file1

     [-a [file1]]   Uses vstereo.ans or file1 as the answer file

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. Then the input image produced
     by vrmatch has to contain in its left part the image issued
     from the left camera and the one issued from the right cam-
     era in its right part.

     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 segmen-
     tated 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 be to find the centroid of these
     regions then computes the depth from the left and right cen-
     troid (cf Stereo formulas at the end of this description).

     The principle remains simple and gives acceptable 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 is not entirely in the
     image because in this case the position of the centroid will
     not be defined with accuracy.

     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 region would be
     further than this maximum distance would be automatically
     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 - camera displacement)/ Z
          (real world)

          Z (real world) = /x_left - x_right /
          camera_displacement * focal_length

REQUIRED ARGUMENTS
     -i     type: infile
            desc: Input Matched Image

     -o     type: outfile
            desc: Output Depth Image

OPTIONAL ARGUMENTS
     -f     type: float
            desc: Focal Length of the Camera
            default: 30
            bounds: 0.000000 < [-f] < 100.000000

     -l     type: float
            desc: Image Length (CCD Sensor)
            default: 10
            bounds: 0.000000 < [-l] < 30.000000

     -h     type: float
            desc: Image Height (CCD Sensor)
            default: 10
            bounds: 0.000000 < [-h] < 30.000000

     -d     type: float
            desc: Camera Displacement on X Axis
            default: 100
            bounds: 0.000000 < [-d] < 100000.000000

     -z     type: float
            desc: Maximum Distance from camera
            default: 6000
            bounds: 0.000000 < [-z] < 10000.000000

EXAMPLES
     vstereo -i reg_match.xv -o depth.xv -f 50.0 -l 10.0 -h 7.0
     -d 30.0 -z 7000.0

     All the value have to be given in millimeters.

     This command will computes the distance from the camera for
     each point belonging to a region in the input image.

SEE ALSO
     intro(1), verror(3), vgparms(3), vutils(3), lvstereo(3)

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

Khoros                    Release: 1.0                          1

