Image Processing 31 - Comparing Two Shapes

Compare the two shapes.

double cv::matchShapes(InputArray contour1,
                    InputArray contour2,
                    int method,
                    double parameter
                    )

This function compares two shapes. All three implemented methods use Hu invariants (see HuMoments)

contour1: The first contour or grayscale image.

contour2 : The second contour or grayscale image.

method: comparison method, see ShapeMatchModes

shape matching method

A for object1, B for object2

CONTOURS_MATCH_I1 

CONTOURS_MATCH_I2 

CONTOURS_MATCH_I3

parameter : Method-specific parameters (not supported now).

Guess you like

Origin blog.csdn.net/u013480226/article/details/123816398