http://www.emgu.com
Implements the chamfer matching algorithm on images taking into account both distance from the template pixels to the nearest pixels and orientation alignment between template and image contours.

Namespace: Emgu.CV
Assembly: Emgu.CV (in Emgu.CV.dll) Version: 2.4.10.1935 (2.4.10.1935)

Syntax

C#
public static int cvChamferMatching(
	Image<Gray, byte> img,
	Image<Gray, byte> templ,
	out Point[][] contours,
	out float[] cost,
	double templScale,
	int maxMatches,
	double minMatchDistance,
	int padX,
	int padY,
	int scales,
	double minScale,
	double maxScale,
	double orientationWeight,
	double truncate
)
Visual Basic
Public Shared Function cvChamferMatching ( 
	img As Image(Of Gray, Byte),
	templ As Image(Of Gray, Byte),
	<OutAttribute> ByRef contours As Point()(),
	<OutAttribute> ByRef cost As Single(),
	templScale As Double,
	maxMatches As Integer,
	minMatchDistance As Double,
	padX As Integer,
	padY As Integer,
	scales As Integer,
	minScale As Double,
	maxScale As Double,
	orientationWeight As Double,
	truncate As Double
) As Integer
Visual C++
public:
static int cvChamferMatching(
	Image<Gray, unsigned char>^ img, 
	Image<Gray, unsigned char>^ templ, 
	[OutAttribute] array<array<Point>^>^% contours, 
	[OutAttribute] array<float>^% cost, 
	double templScale, 
	int maxMatches, 
	double minMatchDistance, 
	int padX, 
	int padY, 
	int scales, 
	double minScale, 
	double maxScale, 
	double orientationWeight, 
	double truncate
)
F#
static member cvChamferMatching : 
        img : Image<Gray, byte> * 
        templ : Image<Gray, byte> * 
        contours : Point[][] byref * 
        cost : float32[] byref * 
        templScale : float * 
        maxMatches : int * 
        minMatchDistance : float * 
        padX : int * 
        padY : int * 
        scales : int * 
        minScale : float * 
        maxScale : float * 
        orientationWeight : float * 
        truncate : float -> int 

Parameters

img
Type: Emgu.CV..::..Image<(Of <(<'Gray, Byte>)>)>
The edge image where search is performed
templ
Type: Emgu.CV..::..Image<(Of <(<'Gray, Byte>)>)>
The template (an edge image)
contours
Type: array<array<System.Drawing..::..Point>[]()[][]>[]()[][]%
The output contours
cost
Type: array<System..::..Single>[]()[][]%
The cost associated with the matching
templScale
Type: System..::..Double
The template scale, use 1 for default
maxMatches
Type: System..::..Int32
The maximum number of matches, use 20 for default
minMatchDistance
Type: System..::..Double
The minimum match distance. use 1.0 for default
padX
Type: System..::..Int32
PadX, use 3 for default
padY
Type: System..::..Int32
PadY, use 3 for default
scales
Type: System..::..Int32
Scales, use 5 for default
minScale
Type: System..::..Double
Minimum scale, use 0.6 for default
maxScale
Type: System..::..Double
Maximum scale, use 1.6 for default
orientationWeight
Type: System..::..Double
Orientation weight, use 0.5 for default
truncate
Type: System..::..Double
Truncate, use 20 for default

Return Value

Type: Int32
The number of matches

See Also