I want to compute a distance between two shapes using the Hausdorff distance or shape context distance measure available in OpenCV 3.0. The shapes are simple white shapes on a black background.
In order to find the distance between two shapes, I find contours of each shape and then pass the contours two the following functions: ShapeDistanceExtractor::computeDistance(contours1, countours2) and HausdorffDistanceExtractor::computeDistance(contours1, countours2).
Could anyone please explain to me, why during the comparison the ShapeDistanceExtractor always returns 0.0, whereas the second method gives me different results depending on the position of a character on the image?