| Cv2DrawMatches 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 DrawMatches(
Mat img1,
IEnumerable<KeyPoint> keypoints1,
Mat img2,
IEnumerable<KeyPoint> keypoints2,
IEnumerable<DMatch> matches1To2,
Mat outImg,
Nullable<Scalar> matchColor = null,
Nullable<Scalar> singlePointColor = null,
IEnumerable<byte> matchesMask = null,
DrawMatchesFlags flags = DrawMatchesFlags.Default
)
Public Shared Sub DrawMatches (
img1 As Mat,
keypoints1 As IEnumerable(Of KeyPoint),
img2 As Mat,
keypoints2 As IEnumerable(Of KeyPoint),
matches1To2 As IEnumerable(Of DMatch),
outImg As Mat,
Optional matchColor As Nullable(Of Scalar) = Nothing,
Optional singlePointColor As Nullable(Of Scalar) = Nothing,
Optional matchesMask As IEnumerable(Of Byte) = Nothing,
Optional flags As DrawMatchesFlags = DrawMatchesFlags.Default
)
public:
static void DrawMatches(
Mat^ img1,
IEnumerable<KeyPoint>^ keypoints1,
Mat^ img2,
IEnumerable<KeyPoint>^ keypoints2,
IEnumerable<DMatch>^ matches1To2,
Mat^ outImg,
Nullable<Scalar> matchColor = nullptr,
Nullable<Scalar> singlePointColor = nullptr,
IEnumerable<unsigned char>^ matchesMask = nullptr,
DrawMatchesFlags flags = DrawMatchesFlags::Default
)
static member DrawMatches :
img1 : Mat *
keypoints1 : IEnumerable<KeyPoint> *
img2 : Mat *
keypoints2 : IEnumerable<KeyPoint> *
matches1To2 : IEnumerable<DMatch> *
outImg : Mat *
?matchColor : Nullable<Scalar> *
?singlePointColor : Nullable<Scalar> *
?matchesMask : IEnumerable<byte> *
?flags : DrawMatchesFlags
(* Defaults:
let _matchColor = defaultArg matchColor null
let _singlePointColor = defaultArg singlePointColor null
let _matchesMask = defaultArg matchesMask null
let _flags = defaultArg flags DrawMatchesFlags.Default
*)
-> unit
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.GenericIEnumerableDMatch
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.GenericIEnumerableByte
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