Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Matching shapes with Hausdorff and Shape Context distance

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?

click to hide/show revision 2
retagged

updated 2015-05-02 01:06:26 -0600

berak gravatar image

Matching shapes with Hausdorff and Shape Context distance

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?

Matching shapes with Hausdorff and Shape Context distance

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) countours2) and HausdorffDistanceExtractor::computeDistance(contours1, countours2).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?