next up previous contents index
Next: km_match_si Up: Reference Previous: km_inflexionpoints   Contents   Index

km_match_ai

$ \bigcirc$Name


km_match_ai Compute affine-invariant matchings between pieces of meaninful boundaries of two images




$ \bigcirc$Command Synopsis


km_match_ai maxError1 maxError2 minLength minComplex levlines1 levlines2 dict1 dict2 matchings matching_pieces



maxError1 : maximum Hausdorff distance allowed between normalized codes

maxError2 : maximum Hausdorff distance allowed (in pixels) between de-normalized codes (to the frame of image 2)

minLength : minimum arclength (in pixels) a matching piece of curve must have to be considered as valid

minComplex : minimum angle variation (in rad.) a matching piece of curve must have to be considered a valid

levlines1 : meaningful boundaries of image 1

levlines2 : meaningful boundaries of image 2

dict1 : dictionary of affine-invariant codes of image 1

dict2 : dictionary of affine-invariant codes of image 2

matchings : list containing the indices of the matching codes

matching_pieces : matchings information: index_curve1_in_levlines1, index_curve2_in_levlines2, index_matching_begins_in_curve1, index_matching_ends_in_curve1, index_matching_begins_in_curve2, index_matching_ends_in_curve2, performance




$ \bigcirc$Function Summary


void km_match_ai (maxError1 , maxError2 , minLength , minComplex , levlines1 , levlines2 , dict1 , dict2 , matchings , matching_pieces )

float maxError1 , maxError2 ;

float minLength , minComplex ;

Flists levlines1 , levlines2 , dict1 , dict2 ;

Flist matchings , matching_pieces ;




$ \bigcirc$Description


The first task perfomed by this module is to determine which pairs of normalized codes from dict1 and dict2 are good candidates to match. This is done by calling the km_prematchings module: for every affine-invariant code in dict1, this module gets its pre-matching codes in dict2. The maximum Hausdorff distance between normalized codes allowed here is maxError1. Notice that the purpose of the pre-matching step is to discard matchings that are clearly bad, in order to reduce computational burden (since the extension step is much more heavy). That's why the maxError1 threshold should not be too much restrictive; maxError1 = 0.2 or 0.3 is a reasonable choice.

Then matching extension is performed for all pre-matchings. For every pair ($ \mathcal {S}$1,$ \mathcal {S}$2) of ``pre-matched'' pieces of curve (sub-curves of $ \mathcal {C}$1 and $ \mathcal {C}$2, resp.), the affine transformation that maps $ \mathcal {S}$1's local frame to $ \mathcal {S}$2's local frame is computed. Then, this transformation is used to put $ \mathcal {C}$1 and $ \mathcal {C}$2 in the frame of image 2. In this frame, lengths and distances between curves are measured in pixels. The matching extension step is based on the following parameters: maxError2, minLength and minComplex.

For every piece of curve in image 1 we keep, among all possible valid matching pieces, the one which maximizes the following criterion:

Performance = $\displaystyle {\frac{{l_1 \times l_2}}{{L_1 \times L_2}}}$,

where l1 = arclength(S1), l2 = arclength(S2), L1 = arclength(C1) and L2 = arclength(C2).

Finally, the result is written in two different formats in Flists matching and matching_pieces.

This last output is to be used with the MegaWave2 module km_savematchings. The outputs of km_savematchings are two Flists that contain all pieces of curve in image 1 and image 2 that match; they can be displayed using fkview.


For more details, see J.-L. Lisani's PhD dissertation [Lis01] or [LMMM03].




$ \bigcirc$See Also


km_prematchings.




$ \bigcirc$Version 1.0


Last Modification date : Thu Apr 10 19:35:09 2003


$ \bigcirc$Author


Jose-Luis Lisani, Pablo Muse, Frederic Sur






next up previous contents index
Next: km_match_si Up: Reference Previous: km_inflexionpoints   Contents   Index
mw 2004-05-05