enum cv::ShapeMatchModes

Overview

Shape matching methods. Moreā€¦

#include <imgproc.hpp>

enum ShapeMatchModes
{
    CONTOURS_MATCH_I1 =1,
    CONTOURS_MATCH_I2 =2,
    CONTOURS_MATCH_I3 =3,
};

Detailed Documentation

Shape matching methods.

\(A\) denotes object1, \(B\) denotes object2

\(\begin{array}{l} m^A_i = \mathrm{sign} (h^A_i) \cdot \log{h^A_i} \\ m^B_i = \mathrm{sign} (h^B_i) \cdot \log{h^B_i} \end{array}\)

and \(h^A_i, h^B_i\) are the Hu moments of \(A\) and \(B\), respectively.

Enum Values

CONTOURS_MATCH_I1
\[I_1(A,B) = \sum _{i=1...7} \left | \frac{1}{m^A_i} - \frac{1}{m^B_i} \right |\]
CONTOURS_MATCH_I2
\[I_2(A,B) = \sum _{i=1...7} \left | m^A_i - m^B_i \right |\]
CONTOURS_MATCH_I3
\[I_3(A,B) = \max _{i=1...7} \frac{ \left| m^A_i - m^B_i \right| }{ \left| m^A_i \right| }\]