Skip to content

ShapeMatchModes

Image processingclassOpenCV 5.0.0
import { ShapeMatchModes } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

ARGUMENTSConstructor or factory
CLASSShapeMatchModes
RETURN TYPEOwned native handle
Call structure. A void return can still write to destination arguments. The parameter descriptions define inputs, outputs and ownership.

Native object: release it with using or delete(). Factories can return null; check before calling methods.

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.

Constructors and members

static 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_I1: ShapeMatchModesValue<1>,

static CONTOURS_MATCH_I2

I_2(A,B) =  \sum _{i=1...7}  \left | m^A_i - m^B_i  \right |
CONTOURS_MATCH_I2: ShapeMatchModesValue<2>,

static 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| }
CONTOURS_MATCH_I3: ShapeMatchModesValue<3>

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.