Shape Distance and Matching

Overview

// classes

class cv::AffineTransformer;
class cv::ChiHistogramCostExtractor;
class cv::EMDHistogramCostExtractor;
class cv::EMDL1HistogramCostExtractor;
class cv::HausdorffDistanceExtractor;
class cv::HistogramCostExtractor;
class cv::NormHistogramCostExtractor;
class cv::ShapeContextDistanceExtractor;
class cv::ShapeDistanceExtractor;
class cv::ShapeTransformer;
class cv::ThinPlateSplineShapeTransformer;

// global functions

Ptr<AffineTransformer>
cv::createAffineTransformer(bool fullAffine);

Ptr<HistogramCostExtractor>
cv::createChiHistogramCostExtractor(
    int nDummies = 25,
    float defaultCost = 0.2f
    );

Ptr<HistogramCostExtractor>
cv::createEMDHistogramCostExtractor(
    int flag = DIST_L2,
    int nDummies = 25,
    float defaultCost = 0.2f
    );

Ptr<HistogramCostExtractor>
cv::createEMDL1HistogramCostExtractor(
    int nDummies = 25,
    float defaultCost = 0.2f
    );

Ptr<HausdorffDistanceExtractor>
cv::createHausdorffDistanceExtractor(
    int distanceFlag = cv::NORM_L2,
    float rankProp = 0.6f
    );

Ptr<HistogramCostExtractor>
cv::createNormHistogramCostExtractor(
    int flag = DIST_L2,
    int nDummies = 25,
    float defaultCost = 0.2f
    );

Ptr<ShapeContextDistanceExtractor>
cv::createShapeContextDistanceExtractor(
    int nAngularBins = 12,
    int nRadialBins = 4,
    float innerRadius = 0.2f,
    float outerRadius = 2,
    int iterations = 3,
    const Ptr<HistogramCostExtractor>& comparer = createChiHistogramCostExtractor(),
    const Ptr<ShapeTransformer>& transformer = createThinPlateSplineShapeTransformer()
    );

Ptr<ThinPlateSplineShapeTransformer>
cv::createThinPlateSplineShapeTransformer(double regularizationParameter = 0);

float
cv::EMDL1(
    InputArray signature1,
    InputArray signature2
    );

Detailed Documentation

Global Functions

Ptr<AffineTransformer>
cv::createAffineTransformer(bool fullAffine)

Complete constructor

Ptr<ThinPlateSplineShapeTransformer>
cv::createThinPlateSplineShapeTransformer(double regularizationParameter = 0)

Complete constructor

float
cv::EMDL1(
    InputArray signature1,
    InputArray signature2
    )

Computes the “minimal work” distance between two weighted point configurations base on the papers “EMD-L1: An efficient and Robust Algorithm for comparing histogram-based descriptors”, by Haibin Ling and Kazunori Okuda; and “The Earth Mover’s Distance is the Mallows Distance: Some Insights from Statistics”, by Elizaveta Levina and Peter Bickel.

Parameters:

signature1 First signature, a single column floating-point matrix. Each row is the value of the histogram in each bin.
signature2 Second signature of the same format and size as signature1.