Figure 3. Contour point correspondence matching. (a) Library
contour reprojected on an image contour using the homography
estimate. (b) Correspondence matching using the distance
transform as external energy, and stiffness and elasticity internal
energy terms. Corresponding sample points are marked by
connecting lines.
according to the gradient of the distance transform in that point,
which is the normal to the reprojected curve. We add internal
terms to preserve the stiffness and elasticity of the contour, and
get the following energy functional