6. The method of claim 4 , wherein the distance between the two corresponding pixels is calculated as a Euclidean distance between the two corresponding pixels.
4. The method of claim 2 , wherein a distance between two corresponding pixels, a first sample contour pixel and a corresponding first template contour pixel is determined based on a first set of coordinate values associated with the first sample contour pixel in the first grid and a second set of coordinate values associated with the first template contour pixel in the second grid.