| OpenCV 3.4.7 Open Source Computer Vision

Classes | Functions
Shape Distance and Matching

## Classes
class | cv::AffineTransformer
| Wrapper class for the OpenCV Affine Transformation algorithm. : More...
class | cv::ChiHistogramCostExtractor
| An Chi based cost extraction. : More...
class | cv::EMDHistogramCostExtractor
| An EMD based cost extraction. : More...
class | cv::EMDL1HistogramCostExtractor
| An EMD-L1 based cost extraction. : More...
class | cv::HausdorffDistanceExtractor
| A simple Hausdorff distance measure between shapes defined by contours. More...
class | cv::HistogramCostExtractor
| Abstract base class for histogram cost algorithms. More...
class | cv::NormHistogramCostExtractor
| A norm based cost extraction. : More...
class | cv::ShapeContextDistanceExtractor
| Implementation of the Shape Context descriptor and matching algorithm. More...
class | cv::ShapeDistanceExtractor
| Abstract base class for shape distance algorithms. More...
class | cv::ShapeTransformer
| Abstract base class for shape transformation algorithms. More...
class | cv::ThinPlateSplineShapeTransformer
| Definition of the transformation. More...

## 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)
| 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. More...

## Detailed Description

## Function Documentation

## § createAffineTransformer()

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

Python:
| retval | = | cv.createAffineTransformer( | fullAffine | )

`#include <opencv2/shape/shape_transformer.hpp>`

Complete constructor

## § createChiHistogramCostExtractor()

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

Python:
| retval | = | cv.createChiHistogramCostExtractor( | [, nDummies[, defaultCost]] | )

`#include <opencv2/shape/hist_cost.hpp>`

## § createEMDHistogramCostExtractor()

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

Python:
| retval | = | cv.createEMDHistogramCostExtractor( | [, flag[, nDummies[, defaultCost]]] | )

`#include <opencv2/shape/hist_cost.hpp>`

## § createEMDL1HistogramCostExtractor()

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

Python:
| retval | = | cv.createEMDL1HistogramCostExtractor( | [, nDummies[, defaultCost]] | )

`#include <opencv2/shape/hist_cost.hpp>`

## § createHausdorffDistanceExtractor()

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

Python:
| retval | = | cv.createHausdorffDistanceExtractor( | [, distanceFlag[, rankProp]] | )

`#include <opencv2/shape/shape_distance.hpp>`

## § createNormHistogramCostExtractor()

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

Python:
| retval | = | cv.createNormHistogramCostExtractor( | [, flag[, nDummies[, defaultCost]]] | )

`#include <opencv2/shape/hist_cost.hpp>`

## § createShapeContextDistanceExtractor()

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()`
| ) |  |

Python:
| retval | = | cv.createShapeContextDistanceExtractor( | [, nAngularBins[, nRadialBins[, innerRadius[, outerRadius[, iterations[, comparer[, transformer]]]]]]] | )

`#include <opencv2/shape/shape_distance.hpp>`

Examples:
  samples/cpp/shape_example.cpp.

## § createThinPlateSplineShapeTransformer()

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

Python:
| retval | = | cv.createThinPlateSplineShapeTransformer( | [, regularizationParameter] | )

`#include <opencv2/shape/shape_transformer.hpp>`

Complete constructor

## § EMDL1()

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

`#include <opencv2/shape/emdL1.hpp>`

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.