示例#1
0
 /// <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="observedImage">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 observedImage,
     VectorOfKeyPoint observedKeyPoints,
     VectorOfDMatch matches,
     IInputOutputArray result,
     MCvScalar matchColor,
     MCvScalar singlePointColor,
     VectorOfByte mask      = null,
     KeypointDrawType flags = KeypointDrawType.Default)
 {
     using (InputArray iaModelImage = modelImage.GetInputArray())
         using (InputArray iaObservedImage = observedImage.GetInputArray())
             using (InputOutputArray ioaResult = result.GetInputOutputArray())
                 Features2DInvoke.drawMatchedFeatures1(iaObservedImage, observedKeyPoints, iaModelImage,
                                                       modelKeypoints, matches, ioaResult, ref matchColor, ref singlePointColor, mask, flags);
 }