km_codecurve_ai Compute affine-invariant codes for a single curve
km_codecurve_ai NNorm FNorm NCurve curve curve_IP curve_FP curve_BP dictionary
NNorm : number of points in the coder
FNorm : ratio of points 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)
Flists km_codecurve_ai (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 ;
This module computes a list of affine invariant codes that represent locally a curve.
To begin with, the inflexion, flat, and bitangent points (resp. IP, FP and BP) of the curve are computed, each one is associated with a direction L1. This direction is either the tangent to IP and FP, or the bitangent to BP.
The affine invariant frame is defined in the following way. For each IP, FP and BP, the next tangent to the curve (L2) is drawn. Let us consider the straight lines (L3 and L4) parallel to L1, between L1 and L2, and at a distance 1/3 and 2/3 from L1. Let P1 and P2 be the intersection points between L3 and L4 and the portion of the curve limited by the point of contact of L1 and L2 with the curve. If L5 is the line passing through P1 and P2, consider the next tangent (L6) to the curve parallel to L5. Finally, denote R1, R2 and R3 the intersection points between respectively L1 and L6, L1 and L5, and L2 and L5.
The affine normalization is defined by mapping these three points to the triangle (0, 0) - (1, 0) - (1, 1) of the plane.
To end with, a piece of the curve is encoded in this frame. Let us consider the arc of length | R1R2|×FNorm whose center point is the intersection of the curve and the median of the segment [R1, R2]. The coordinates of NNorm equidistant points lying on this arc are computed in the affine invariant frame. These NNorm points are a local code of 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 R1, R2 and R3, and step between encoded points. 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].
Last Modification date : Thu Apr 15 00:46:13 2004
Jose-Luis Lisani, Pablo Muse, Frederic Sur