OpenCV  4.0.0
Open Source Computer Vision
Public Member Functions | List of all members
cv::HausdorffDistanceExtractor Class Referenceabstract

A simple Hausdorff distance measure between shapes defined by contours. More...

#include "shape_distance.hpp"

Inheritance diagram for cv::HausdorffDistanceExtractor:
cv::ShapeDistanceExtractor cv::Algorithm

Public Member Functions

virtual int getDistanceFlag () const =0
 
virtual float getRankProportion () const =0
 
virtual void setDistanceFlag (int distanceFlag)=0
 Set the norm used to compute the Hausdorff value between two shapes. It can be L1 or L2 norm. More...
 
virtual void setRankProportion (float rankProportion)=0
 This method sets the rank proportion (or fractional value) that establish the Kth ranked value of the partial Hausdorff distance. Experimentally had been shown that 0.6 is a good value to compare shapes. More...
 
- Public Member Functions inherited from cv::ShapeDistanceExtractor
virtual float computeDistance (InputArray contour1, InputArray contour2)=0
 Compute the shape distance between two shapes defined by its contours. More...
 
- Public Member Functions inherited from cv::Algorithm
 Algorithm ()
 
virtual ~Algorithm ()
 
virtual void clear ()
 Clears the algorithm state. More...
 
virtual bool empty () const
 Returns true if the Algorithm is empty (e.g. in the very beginning or after unsuccessful read. More...
 
virtual String getDefaultName () const
 
virtual void read (const FileNode &fn)
 Reads algorithm parameters from a file storage. More...
 
virtual void save (const String &filename) const
 
virtual void write (FileStorage &fs) const
 Stores algorithm parameters in a file storage. More...
 
void write (const Ptr< FileStorage > &fs, const String &name=String()) const
 simplified API for language bindings This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from cv::Algorithm
template<typename _Tp >
static Ptr< _Tp > load (const String &filename, const String &objname=String())
 Loads algorithm from the file. More...
 
template<typename _Tp >
static Ptr< _Tp > loadFromString (const String &strModel, const String &objname=String())
 Loads algorithm from a String. More...
 
template<typename _Tp >
static Ptr< _Tp > read (const FileNode &fn)
 Reads algorithm from the file node. More...
 
- Protected Member Functions inherited from cv::Algorithm
void writeFormat (FileStorage &fs) const
 

Detailed Description

A simple Hausdorff distance measure between shapes defined by contours.

according to the paper "Comparing Images using the Hausdorff distance." by D.P. Huttenlocher, G.A. Klanderman, and W.J. Rucklidge. (PAMI 1993). :

Member Function Documentation

§ getDistanceFlag()

virtual int cv::HausdorffDistanceExtractor::getDistanceFlag ( ) const
pure virtual
Python:
retval=cv.HausdorffDistanceExtractor.getDistanceFlag()

§ getRankProportion()

virtual float cv::HausdorffDistanceExtractor::getRankProportion ( ) const
pure virtual
Python:
retval=cv.HausdorffDistanceExtractor.getRankProportion()

§ setDistanceFlag()

virtual void cv::HausdorffDistanceExtractor::setDistanceFlag ( int  distanceFlag)
pure virtual
Python:
None=cv.HausdorffDistanceExtractor.setDistanceFlag(distanceFlag)

Set the norm used to compute the Hausdorff value between two shapes. It can be L1 or L2 norm.

Parameters
distanceFlagFlag indicating which norm is used to compute the Hausdorff distance (NORM_L1, NORM_L2).

§ setRankProportion()

virtual void cv::HausdorffDistanceExtractor::setRankProportion ( float  rankProportion)
pure virtual
Python:
None=cv.HausdorffDistanceExtractor.setRankProportion(rankProportion)

This method sets the rank proportion (or fractional value) that establish the Kth ranked value of the partial Hausdorff distance. Experimentally had been shown that 0.6 is a good value to compare shapes.

Parameters
rankProportionfractional value (between 0 and 1).

The documentation for this class was generated from the following file: