/// <summary> /// Draw the matched keypoints between the model image and the observered image. /// </summary> /// <param name="modelImage">The model image</param> /// <param name="modelKeypoints">The keypoints in the model image</param> /// <param name="observerdImage">The observed image</param> /// <param name="observedKeyPoints">The keypoints in the observed image</param> /// <param name="matchColor">The color for the match correspondence lines</param> /// <param name="singlePointColor">The color for highlighting the keypoints</param> /// <param name="mask">The mask for the matches. Use null for all matches.</param> /// <param name="flags">The drawing type</param> /// <param name="result">The image where model and observed image is displayed side by side. Matches are drawn as indicated by the flag</param> /// <param name="matches">Matches. Each matches[i] is k or less matches for the same query descriptor.</param> public static void DrawMatches( IInputArray modelImage, VectorOfKeyPoint modelKeypoints, IInputArray observerdImage, VectorOfKeyPoint observedKeyPoints, VectorOfVectorOfDMatch matches, IInputOutputArray result, MCvScalar matchColor, MCvScalar singlePointColor, IInputArray mask = null, KeypointDrawType flags = KeypointDrawType.Default) { using (InputArray iaModelImage = modelImage.GetInputArray()) using (InputArray iaObserverdImage = observerdImage.GetInputArray()) using (InputOutputArray ioaResult = result.GetInputOutputArray()) using (InputArray iaMask = mask == null ? InputArray.GetEmpty() : mask.GetInputArray()) Features2DInvoke.drawMatchedFeatures(iaObserverdImage, observedKeyPoints, iaModelImage, modelKeypoints, matches, ioaResult, ref matchColor, ref singlePointColor, iaMask, flags); }