lvrmatch(3)

LIBRARY ROUTINE
lvrmatch - Matching of regions in 2 images

LIBRARY CALL
#include "vinclude.h"
int  lvrmatch(ima1,ima2,image)
struct xvimage *ima1, *ima2, **image;

INPUT

    ima1 _ xvimage structure : First Input Image to be matched. ima2 _ xvimage structure : Second Input Image to be matched.

OUTPUT

    image holds the result (matched regions).

MODIFICATIONS

DESCRIPTION

WARNING: This is a temporary algorithm which has been used for stereo application prototyping. It can't be considered as the result of deep research on the topic.

lvrmatch analyses two input images supposed to be similar. The input images can either be the left and right images of a stereo image data base or successive images from an image data flow process.

These images have to be previously preprocessed in the following manner:

Region_segmentation:
    This segmentation should give an image in which each connex region is labelled with its own label number. Also, this image has to be an integer image (VFF_TYP_4_BYTE).

The matching principle could be modified for different application purposes but this first try will use a computation of the probability for the region number Ni (first image) being region number Mj (second image).

    P(Ni = Mj) = 1 - Surface( SXOR (Ni , Mj)) / (Surface (Ni) + Surface(Nj))

    SXOR is computed by translating Ni by a vector V such that the new centroid of Ni and the Mj's one coincide.

    if SXOR(Ni,Mj) is small (surface of Ni matches with Mj) the probability of Ni being Mj is close to 1.

    On the contrary if SXOR(Ni,Mj) is relatively big (the two surfaces don't match : different shape or size, etc) then the probability of Ni being Mj is close from 0.

In stereo or optical flow there is some differences of shape between two regions representing the same thing. If these differences are too important (due to the segmentation algorithm like vlabel ,etc, or simply to the fact that images are really different) then the probability for these regions being the same object won't be as good as expected. In that case a heuristic approach will try to match them relying on the distance between the two centroids.

The final result is an image containing both image1 and image2 on the left and right side, in which the label of each connex matched region will be the same for the left and right part making it possible for one to see what has been recognized.

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

RESTRICTIONS

AUTHOR
Pascal Adam

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