**Name**

**km_codecurve_si** Compute similitude-invariant codes for a single curve

**Command Synopsis**

**km_codecurve_si** *NNorm* *FNorm* *NCurve* *curve* *curve_IP* *curve_FP* *curve_BP* *dictionary*

NNorm: number of points in the code

FNorm: ratio length to be encoded

NCurve: index of the curve in the list

curve: curve to encode (Flist)

curve_IP: indices of inflexion points of the curve (1-Flist)

curve_FP: indices of flat points of the curve (1-Flist)

curve_BP: indices of bitangent points of the curve (2-Flist)

dictionary: output dictionnary (Flists)

**Function Summary**

Flists km_codecurve_si (curve , curve_IP , curve_FP , curve_BP , dict , NC , NN , FN )

Flist curve ;

Flist curve_IP ;

Flist curve_FP ;

Flist curve_BP ;

Flists dict ;

int NC ;

int NN ;

float FN ;

**Description**

This module computes a list of similitude invariant codes that represent locally a curve.

More precisely speaking, the inflexion, flat, and bitangent points (resp. IP, FP and BP) of the curve are first computed, each one is associated with a direction (). This direction is either the tangent to IP and FP, or the bitangent to BP.

Then a similitude invariant frame is defined for every IP, FP and BP: the two perpendiculars (
_{1} and
_{2}) to the previous direction which are tangent to the curve are drawn (we get the first by making progress in a direction, the second in the opposite direction). Their intersections *R*_{1} and *R*_{2} with are two points which define a similitude invariant frame.

To end with, a piece of the curve is encoded. Let us consider the arc of length
| *R*_{1}*R*_{2} ×FNorm whose center point is the intersection of the curve and the median of the segment [*R*_{1}, *R*_{2}]. The coordinates of
NNorm equidistant points lying on this arc are computed in the similitude invariant frame. These
NNorm points encode locally the curve.

Each code is stored in an Flist structure, whose data field contains the following informations: number of the curve, indices of both limits of the encoded arc in the initial curve, coordinates of the central point of the arc, indices of both points of the curve surrounding the central point, coordinates of *R*_{1} and *R*_{2}, and sampling step. The data field is useful for postprocessing.

The result is the collection of these codes stored in an Flists structure.

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

**See Also**

**Version 1.0**

Last Modification date : Wed Apr 9 19:26:44 2003

**Author**

Jose-Luis Lisani, Pablo Muse, Frederic Sur