Click or drag to resize

Cv2DrawMatchesKnn Method

Draws the found matches of keypoints from two images.

Namespace:  OpenCvSharp
Assembly:  OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax
public static void DrawMatchesKnn(
	Mat img1,
	IEnumerable<KeyPoint> keypoints1,
	Mat img2,
	IEnumerable<KeyPoint> keypoints2,
	IEnumerable<IEnumerable<DMatch>> matches1To2,
	Mat outImg,
	Nullable<Scalar> matchColor = null,
	Nullable<Scalar> singlePointColor = null,
	IEnumerable<IEnumerable<byte>> matchesMask = null,
	DrawMatchesFlags flags = DrawMatchesFlags.Default
)

Parameters

img1
Type: OpenCvSharpMat
First source image.
keypoints1
Type: System.Collections.GenericIEnumerableKeyPoint
Keypoints from the first source image.
img2
Type: OpenCvSharpMat
Second source image.
keypoints2
Type: System.Collections.GenericIEnumerableKeyPoint
Keypoints from the second source image.
matches1To2
Type: System.Collections.GenericIEnumerableIEnumerableDMatch
Matches from the first image to the second one, which means that keypoints1[i] has a corresponding point in keypoints2[matches[i]] .
outImg
Type: OpenCvSharpMat
Output image. Its content depends on the flags value defining what is drawn in the output image. See possible flags bit values below.
matchColor (Optional)
Type: SystemNullableScalar
Color of matches (lines and connected keypoints). If matchColor==Scalar::all(-1), the color is generated randomly.
singlePointColor (Optional)
Type: SystemNullableScalar
Color of single keypoints (circles), which means that keypoints do not have the matches. If singlePointColor==Scalar::all(-1) , the color is generated randomly.
matchesMask (Optional)
Type: System.Collections.GenericIEnumerableIEnumerableByte
Mask determining which matches are drawn. If the mask is empty, all matches are drawn.
flags (Optional)
Type: OpenCvSharpDrawMatchesFlags
Flags setting drawing features. Possible flags bit values are defined by DrawMatchesFlags.
See Also