123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529 |
- using OpenCVForUnity.CoreModule;
- using OpenCVForUnity.UtilsModule;
- using System;
- using System.Collections.Generic;
- using System.Runtime.InteropServices;
- namespace OpenCVForUnity.Features2dModule
- {
- // C++: class Features2d
- public class Features2d
- {
- // C++: enum cv.DrawMatchesFlags
- public const int DrawMatchesFlags_DEFAULT = 0;
- public const int DrawMatchesFlags_DRAW_OVER_OUTIMG = 1;
- public const int DrawMatchesFlags_NOT_DRAW_SINGLE_POINTS = 2;
- public const int DrawMatchesFlags_DRAW_RICH_KEYPOINTS = 4;
- //
- // C++: void cv::drawKeypoints(Mat image, vector_KeyPoint keypoints, Mat& outImage, Scalar color = Scalar::all(-1), DrawMatchesFlags flags = DrawMatchesFlags::DEFAULT)
- //
- /**
- * Draws keypoints.
- *
- * param image Source image.
- * param keypoints Keypoints from the source image.
- * param outImage Output image. Its content depends on the flags value defining what is drawn in the
- * output image. See possible flags bit values below.
- * param color Color of keypoints.
- * param flags Flags setting drawing features. Possible flags bit values are defined by
- * DrawMatchesFlags. See details above in drawMatches .
- *
- * <b>Note:</b>
- * For Python API, flags are modified as cv.DRAW_MATCHES_FLAGS_DEFAULT,
- * cv.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS, cv.DRAW_MATCHES_FLAGS_DRAW_OVER_OUTIMG,
- * cv.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS
- */
- public static void drawKeypoints(Mat image, MatOfKeyPoint keypoints, Mat outImage, Scalar color, int flags)
- {
- if (image != null) image.ThrowIfDisposed();
- if (keypoints != null) keypoints.ThrowIfDisposed();
- if (outImage != null) outImage.ThrowIfDisposed();
- Mat keypoints_mat = keypoints;
- features2d_Features2d_drawKeypoints_10(image.nativeObj, keypoints_mat.nativeObj, outImage.nativeObj, color.val[0], color.val[1], color.val[2], color.val[3], flags);
- }
- /**
- * Draws keypoints.
- *
- * param image Source image.
- * param keypoints Keypoints from the source image.
- * param outImage Output image. Its content depends on the flags value defining what is drawn in the
- * output image. See possible flags bit values below.
- * param color Color of keypoints.
- * DrawMatchesFlags. See details above in drawMatches .
- *
- * <b>Note:</b>
- * For Python API, flags are modified as cv.DRAW_MATCHES_FLAGS_DEFAULT,
- * cv.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS, cv.DRAW_MATCHES_FLAGS_DRAW_OVER_OUTIMG,
- * cv.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS
- */
- public static void drawKeypoints(Mat image, MatOfKeyPoint keypoints, Mat outImage, Scalar color)
- {
- if (image != null) image.ThrowIfDisposed();
- if (keypoints != null) keypoints.ThrowIfDisposed();
- if (outImage != null) outImage.ThrowIfDisposed();
- Mat keypoints_mat = keypoints;
- features2d_Features2d_drawKeypoints_11(image.nativeObj, keypoints_mat.nativeObj, outImage.nativeObj, color.val[0], color.val[1], color.val[2], color.val[3]);
- }
- /**
- * Draws keypoints.
- *
- * param image Source image.
- * param keypoints Keypoints from the source image.
- * param outImage Output image. Its content depends on the flags value defining what is drawn in the
- * output image. See possible flags bit values below.
- * DrawMatchesFlags. See details above in drawMatches .
- *
- * <b>Note:</b>
- * For Python API, flags are modified as cv.DRAW_MATCHES_FLAGS_DEFAULT,
- * cv.DRAW_MATCHES_FLAGS_DRAW_RICH_KEYPOINTS, cv.DRAW_MATCHES_FLAGS_DRAW_OVER_OUTIMG,
- * cv.DRAW_MATCHES_FLAGS_NOT_DRAW_SINGLE_POINTS
- */
- public static void drawKeypoints(Mat image, MatOfKeyPoint keypoints, Mat outImage)
- {
- if (image != null) image.ThrowIfDisposed();
- if (keypoints != null) keypoints.ThrowIfDisposed();
- if (outImage != null) outImage.ThrowIfDisposed();
- Mat keypoints_mat = keypoints;
- features2d_Features2d_drawKeypoints_12(image.nativeObj, keypoints_mat.nativeObj, outImage.nativeObj);
- }
- //
- // C++: void cv::drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_DMatch matches1to2, Mat& outImg, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_char matchesMask = std::vector<char>(), DrawMatchesFlags flags = DrawMatchesFlags::DEFAULT)
- //
- /**
- * Draws the found matches of keypoints from two images.
- *
- * param img1 First source image.
- * param keypoints1 Keypoints from the first source image.
- * param img2 Second source image.
- * param keypoints2 Keypoints from the second source image.
- * param matches1to2 Matches from the first image to the second one, which means that keypoints1[i]
- * has a corresponding point in keypoints2[matches[i]] .
- * param outImg Output image. Its content depends on the flags value defining what is drawn in the
- * output image. See possible flags bit values below.
- * param matchColor Color of matches (lines and connected keypoints). If matchColor==Scalar::all(-1)
- * , the color is generated randomly.
- * param singlePointColor Color of single keypoints (circles), which means that keypoints do not
- * have the matches. If singlePointColor==Scalar::all(-1) , the color is generated randomly.
- * param matchesMask Mask determining which matches are drawn. If the mask is empty, all matches are
- * drawn.
- * param flags Flags setting drawing features. Possible flags bit values are defined by
- * DrawMatchesFlags.
- *
- * This function draws matches of keypoints from two images in the output image. Match is a line
- * connecting two keypoints (circles). See cv::DrawMatchesFlags.
- */
- public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor, MatOfByte matchesMask, int flags)
- {
- if (img1 != null) img1.ThrowIfDisposed();
- if (keypoints1 != null) keypoints1.ThrowIfDisposed();
- if (img2 != null) img2.ThrowIfDisposed();
- if (keypoints2 != null) keypoints2.ThrowIfDisposed();
- if (matches1to2 != null) matches1to2.ThrowIfDisposed();
- if (outImg != null) outImg.ThrowIfDisposed();
- if (matchesMask != null) matchesMask.ThrowIfDisposed();
- Mat keypoints1_mat = keypoints1;
- Mat keypoints2_mat = keypoints2;
- Mat matches1to2_mat = matches1to2;
- Mat matchesMask_mat = matchesMask;
- features2d_Features2d_drawMatches_10(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchColor.val[0], matchColor.val[1], matchColor.val[2], matchColor.val[3], singlePointColor.val[0], singlePointColor.val[1], singlePointColor.val[2], singlePointColor.val[3], matchesMask_mat.nativeObj, flags);
- }
- /**
- * Draws the found matches of keypoints from two images.
- *
- * param img1 First source image.
- * param keypoints1 Keypoints from the first source image.
- * param img2 Second source image.
- * param keypoints2 Keypoints from the second source image.
- * param matches1to2 Matches from the first image to the second one, which means that keypoints1[i]
- * has a corresponding point in keypoints2[matches[i]] .
- * param outImg Output image. Its content depends on the flags value defining what is drawn in the
- * output image. See possible flags bit values below.
- * param matchColor Color of matches (lines and connected keypoints). If matchColor==Scalar::all(-1)
- * , the color is generated randomly.
- * param singlePointColor Color of single keypoints (circles), which means that keypoints do not
- * have the matches. If singlePointColor==Scalar::all(-1) , the color is generated randomly.
- * param matchesMask Mask determining which matches are drawn. If the mask is empty, all matches are
- * drawn.
- * DrawMatchesFlags.
- *
- * This function draws matches of keypoints from two images in the output image. Match is a line
- * connecting two keypoints (circles). See cv::DrawMatchesFlags.
- */
- public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor, MatOfByte matchesMask)
- {
- if (img1 != null) img1.ThrowIfDisposed();
- if (keypoints1 != null) keypoints1.ThrowIfDisposed();
- if (img2 != null) img2.ThrowIfDisposed();
- if (keypoints2 != null) keypoints2.ThrowIfDisposed();
- if (matches1to2 != null) matches1to2.ThrowIfDisposed();
- if (outImg != null) outImg.ThrowIfDisposed();
- if (matchesMask != null) matchesMask.ThrowIfDisposed();
- Mat keypoints1_mat = keypoints1;
- Mat keypoints2_mat = keypoints2;
- Mat matches1to2_mat = matches1to2;
- Mat matchesMask_mat = matchesMask;
- features2d_Features2d_drawMatches_11(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchColor.val[0], matchColor.val[1], matchColor.val[2], matchColor.val[3], singlePointColor.val[0], singlePointColor.val[1], singlePointColor.val[2], singlePointColor.val[3], matchesMask_mat.nativeObj);
- }
- /**
- * Draws the found matches of keypoints from two images.
- *
- * param img1 First source image.
- * param keypoints1 Keypoints from the first source image.
- * param img2 Second source image.
- * param keypoints2 Keypoints from the second source image.
- * param matches1to2 Matches from the first image to the second one, which means that keypoints1[i]
- * has a corresponding point in keypoints2[matches[i]] .
- * param outImg Output image. Its content depends on the flags value defining what is drawn in the
- * output image. See possible flags bit values below.
- * param matchColor Color of matches (lines and connected keypoints). If matchColor==Scalar::all(-1)
- * , the color is generated randomly.
- * param singlePointColor Color of single keypoints (circles), which means that keypoints do not
- * have the matches. If singlePointColor==Scalar::all(-1) , the color is generated randomly.
- * drawn.
- * DrawMatchesFlags.
- *
- * This function draws matches of keypoints from two images in the output image. Match is a line
- * connecting two keypoints (circles). See cv::DrawMatchesFlags.
- */
- public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor)
- {
- if (img1 != null) img1.ThrowIfDisposed();
- if (keypoints1 != null) keypoints1.ThrowIfDisposed();
- if (img2 != null) img2.ThrowIfDisposed();
- if (keypoints2 != null) keypoints2.ThrowIfDisposed();
- if (matches1to2 != null) matches1to2.ThrowIfDisposed();
- if (outImg != null) outImg.ThrowIfDisposed();
- Mat keypoints1_mat = keypoints1;
- Mat keypoints2_mat = keypoints2;
- Mat matches1to2_mat = matches1to2;
- features2d_Features2d_drawMatches_12(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchColor.val[0], matchColor.val[1], matchColor.val[2], matchColor.val[3], singlePointColor.val[0], singlePointColor.val[1], singlePointColor.val[2], singlePointColor.val[3]);
- }
- /**
- * Draws the found matches of keypoints from two images.
- *
- * param img1 First source image.
- * param keypoints1 Keypoints from the first source image.
- * param img2 Second source image.
- * param keypoints2 Keypoints from the second source image.
- * param matches1to2 Matches from the first image to the second one, which means that keypoints1[i]
- * has a corresponding point in keypoints2[matches[i]] .
- * param outImg Output image. Its content depends on the flags value defining what is drawn in the
- * output image. See possible flags bit values below.
- * param matchColor Color of matches (lines and connected keypoints). If matchColor==Scalar::all(-1)
- * , the color is generated randomly.
- * have the matches. If singlePointColor==Scalar::all(-1) , the color is generated randomly.
- * drawn.
- * DrawMatchesFlags.
- *
- * This function draws matches of keypoints from two images in the output image. Match is a line
- * connecting two keypoints (circles). See cv::DrawMatchesFlags.
- */
- public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg, Scalar matchColor)
- {
- if (img1 != null) img1.ThrowIfDisposed();
- if (keypoints1 != null) keypoints1.ThrowIfDisposed();
- if (img2 != null) img2.ThrowIfDisposed();
- if (keypoints2 != null) keypoints2.ThrowIfDisposed();
- if (matches1to2 != null) matches1to2.ThrowIfDisposed();
- if (outImg != null) outImg.ThrowIfDisposed();
- Mat keypoints1_mat = keypoints1;
- Mat keypoints2_mat = keypoints2;
- Mat matches1to2_mat = matches1to2;
- features2d_Features2d_drawMatches_13(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchColor.val[0], matchColor.val[1], matchColor.val[2], matchColor.val[3]);
- }
- /**
- * Draws the found matches of keypoints from two images.
- *
- * param img1 First source image.
- * param keypoints1 Keypoints from the first source image.
- * param img2 Second source image.
- * param keypoints2 Keypoints from the second source image.
- * param matches1to2 Matches from the first image to the second one, which means that keypoints1[i]
- * has a corresponding point in keypoints2[matches[i]] .
- * param outImg Output image. Its content depends on the flags value defining what is drawn in the
- * output image. See possible flags bit values below.
- * , the color is generated randomly.
- * have the matches. If singlePointColor==Scalar::all(-1) , the color is generated randomly.
- * drawn.
- * DrawMatchesFlags.
- *
- * This function draws matches of keypoints from two images in the output image. Match is a line
- * connecting two keypoints (circles). See cv::DrawMatchesFlags.
- */
- public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg)
- {
- if (img1 != null) img1.ThrowIfDisposed();
- if (keypoints1 != null) keypoints1.ThrowIfDisposed();
- if (img2 != null) img2.ThrowIfDisposed();
- if (keypoints2 != null) keypoints2.ThrowIfDisposed();
- if (matches1to2 != null) matches1to2.ThrowIfDisposed();
- if (outImg != null) outImg.ThrowIfDisposed();
- Mat keypoints1_mat = keypoints1;
- Mat keypoints2_mat = keypoints2;
- Mat matches1to2_mat = matches1to2;
- features2d_Features2d_drawMatches_14(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj);
- }
- //
- // C++: void cv::drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_DMatch matches1to2, Mat& outImg, int matchesThickness, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_char matchesMask = std::vector<char>(), DrawMatchesFlags flags = DrawMatchesFlags::DEFAULT)
- //
- public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg, int matchesThickness, Scalar matchColor, Scalar singlePointColor, MatOfByte matchesMask, int flags)
- {
- if (img1 != null) img1.ThrowIfDisposed();
- if (keypoints1 != null) keypoints1.ThrowIfDisposed();
- if (img2 != null) img2.ThrowIfDisposed();
- if (keypoints2 != null) keypoints2.ThrowIfDisposed();
- if (matches1to2 != null) matches1to2.ThrowIfDisposed();
- if (outImg != null) outImg.ThrowIfDisposed();
- if (matchesMask != null) matchesMask.ThrowIfDisposed();
- Mat keypoints1_mat = keypoints1;
- Mat keypoints2_mat = keypoints2;
- Mat matches1to2_mat = matches1to2;
- Mat matchesMask_mat = matchesMask;
- features2d_Features2d_drawMatches_15(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchesThickness, matchColor.val[0], matchColor.val[1], matchColor.val[2], matchColor.val[3], singlePointColor.val[0], singlePointColor.val[1], singlePointColor.val[2], singlePointColor.val[3], matchesMask_mat.nativeObj, flags);
- }
- public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg, int matchesThickness, Scalar matchColor, Scalar singlePointColor, MatOfByte matchesMask)
- {
- if (img1 != null) img1.ThrowIfDisposed();
- if (keypoints1 != null) keypoints1.ThrowIfDisposed();
- if (img2 != null) img2.ThrowIfDisposed();
- if (keypoints2 != null) keypoints2.ThrowIfDisposed();
- if (matches1to2 != null) matches1to2.ThrowIfDisposed();
- if (outImg != null) outImg.ThrowIfDisposed();
- if (matchesMask != null) matchesMask.ThrowIfDisposed();
- Mat keypoints1_mat = keypoints1;
- Mat keypoints2_mat = keypoints2;
- Mat matches1to2_mat = matches1to2;
- Mat matchesMask_mat = matchesMask;
- features2d_Features2d_drawMatches_16(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchesThickness, matchColor.val[0], matchColor.val[1], matchColor.val[2], matchColor.val[3], singlePointColor.val[0], singlePointColor.val[1], singlePointColor.val[2], singlePointColor.val[3], matchesMask_mat.nativeObj);
- }
- public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg, int matchesThickness, Scalar matchColor, Scalar singlePointColor)
- {
- if (img1 != null) img1.ThrowIfDisposed();
- if (keypoints1 != null) keypoints1.ThrowIfDisposed();
- if (img2 != null) img2.ThrowIfDisposed();
- if (keypoints2 != null) keypoints2.ThrowIfDisposed();
- if (matches1to2 != null) matches1to2.ThrowIfDisposed();
- if (outImg != null) outImg.ThrowIfDisposed();
- Mat keypoints1_mat = keypoints1;
- Mat keypoints2_mat = keypoints2;
- Mat matches1to2_mat = matches1to2;
- features2d_Features2d_drawMatches_17(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchesThickness, matchColor.val[0], matchColor.val[1], matchColor.val[2], matchColor.val[3], singlePointColor.val[0], singlePointColor.val[1], singlePointColor.val[2], singlePointColor.val[3]);
- }
- public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg, int matchesThickness, Scalar matchColor)
- {
- if (img1 != null) img1.ThrowIfDisposed();
- if (keypoints1 != null) keypoints1.ThrowIfDisposed();
- if (img2 != null) img2.ThrowIfDisposed();
- if (keypoints2 != null) keypoints2.ThrowIfDisposed();
- if (matches1to2 != null) matches1to2.ThrowIfDisposed();
- if (outImg != null) outImg.ThrowIfDisposed();
- Mat keypoints1_mat = keypoints1;
- Mat keypoints2_mat = keypoints2;
- Mat matches1to2_mat = matches1to2;
- features2d_Features2d_drawMatches_18(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchesThickness, matchColor.val[0], matchColor.val[1], matchColor.val[2], matchColor.val[3]);
- }
- public static void drawMatches(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, MatOfDMatch matches1to2, Mat outImg, int matchesThickness)
- {
- if (img1 != null) img1.ThrowIfDisposed();
- if (keypoints1 != null) keypoints1.ThrowIfDisposed();
- if (img2 != null) img2.ThrowIfDisposed();
- if (keypoints2 != null) keypoints2.ThrowIfDisposed();
- if (matches1to2 != null) matches1to2.ThrowIfDisposed();
- if (outImg != null) outImg.ThrowIfDisposed();
- Mat keypoints1_mat = keypoints1;
- Mat keypoints2_mat = keypoints2;
- Mat matches1to2_mat = matches1to2;
- features2d_Features2d_drawMatches_19(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchesThickness);
- }
- //
- // C++: void cv::drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_vector_DMatch matches1to2, Mat& outImg, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_vector_char matchesMask = std::vector<std::vector<char> >(), DrawMatchesFlags flags = DrawMatchesFlags::DEFAULT)
- //
- public static void drawMatchesKnn(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor, List<MatOfByte> matchesMask, int flags)
- {
- if (img1 != null) img1.ThrowIfDisposed();
- if (keypoints1 != null) keypoints1.ThrowIfDisposed();
- if (img2 != null) img2.ThrowIfDisposed();
- if (keypoints2 != null) keypoints2.ThrowIfDisposed();
- if (outImg != null) outImg.ThrowIfDisposed();
- Mat keypoints1_mat = keypoints1;
- Mat keypoints2_mat = keypoints2;
- List<Mat> matches1to2_tmplm = new List<Mat>((matches1to2 != null) ? matches1to2.Count : 0);
- Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
- List<Mat> matchesMask_tmplm = new List<Mat>((matchesMask != null) ? matchesMask.Count : 0);
- Mat matchesMask_mat = Converters.vector_vector_char_to_Mat(matchesMask, matchesMask_tmplm);
- features2d_Features2d_drawMatchesKnn_10(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchColor.val[0], matchColor.val[1], matchColor.val[2], matchColor.val[3], singlePointColor.val[0], singlePointColor.val[1], singlePointColor.val[2], singlePointColor.val[3], matchesMask_mat.nativeObj, flags);
- }
- public static void drawMatchesKnn(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor, List<MatOfByte> matchesMask)
- {
- if (img1 != null) img1.ThrowIfDisposed();
- if (keypoints1 != null) keypoints1.ThrowIfDisposed();
- if (img2 != null) img2.ThrowIfDisposed();
- if (keypoints2 != null) keypoints2.ThrowIfDisposed();
- if (outImg != null) outImg.ThrowIfDisposed();
- Mat keypoints1_mat = keypoints1;
- Mat keypoints2_mat = keypoints2;
- List<Mat> matches1to2_tmplm = new List<Mat>((matches1to2 != null) ? matches1to2.Count : 0);
- Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
- List<Mat> matchesMask_tmplm = new List<Mat>((matchesMask != null) ? matchesMask.Count : 0);
- Mat matchesMask_mat = Converters.vector_vector_char_to_Mat(matchesMask, matchesMask_tmplm);
- features2d_Features2d_drawMatchesKnn_11(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchColor.val[0], matchColor.val[1], matchColor.val[2], matchColor.val[3], singlePointColor.val[0], singlePointColor.val[1], singlePointColor.val[2], singlePointColor.val[3], matchesMask_mat.nativeObj);
- }
- public static void drawMatchesKnn(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg, Scalar matchColor, Scalar singlePointColor)
- {
- if (img1 != null) img1.ThrowIfDisposed();
- if (keypoints1 != null) keypoints1.ThrowIfDisposed();
- if (img2 != null) img2.ThrowIfDisposed();
- if (keypoints2 != null) keypoints2.ThrowIfDisposed();
- if (outImg != null) outImg.ThrowIfDisposed();
- Mat keypoints1_mat = keypoints1;
- Mat keypoints2_mat = keypoints2;
- List<Mat> matches1to2_tmplm = new List<Mat>((matches1to2 != null) ? matches1to2.Count : 0);
- Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
- features2d_Features2d_drawMatchesKnn_12(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchColor.val[0], matchColor.val[1], matchColor.val[2], matchColor.val[3], singlePointColor.val[0], singlePointColor.val[1], singlePointColor.val[2], singlePointColor.val[3]);
- }
- public static void drawMatchesKnn(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg, Scalar matchColor)
- {
- if (img1 != null) img1.ThrowIfDisposed();
- if (keypoints1 != null) keypoints1.ThrowIfDisposed();
- if (img2 != null) img2.ThrowIfDisposed();
- if (keypoints2 != null) keypoints2.ThrowIfDisposed();
- if (outImg != null) outImg.ThrowIfDisposed();
- Mat keypoints1_mat = keypoints1;
- Mat keypoints2_mat = keypoints2;
- List<Mat> matches1to2_tmplm = new List<Mat>((matches1to2 != null) ? matches1to2.Count : 0);
- Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
- features2d_Features2d_drawMatchesKnn_13(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj, matchColor.val[0], matchColor.val[1], matchColor.val[2], matchColor.val[3]);
- }
- public static void drawMatchesKnn(Mat img1, MatOfKeyPoint keypoints1, Mat img2, MatOfKeyPoint keypoints2, List<MatOfDMatch> matches1to2, Mat outImg)
- {
- if (img1 != null) img1.ThrowIfDisposed();
- if (keypoints1 != null) keypoints1.ThrowIfDisposed();
- if (img2 != null) img2.ThrowIfDisposed();
- if (keypoints2 != null) keypoints2.ThrowIfDisposed();
- if (outImg != null) outImg.ThrowIfDisposed();
- Mat keypoints1_mat = keypoints1;
- Mat keypoints2_mat = keypoints2;
- List<Mat> matches1to2_tmplm = new List<Mat>((matches1to2 != null) ? matches1to2.Count : 0);
- Mat matches1to2_mat = Converters.vector_vector_DMatch_to_Mat(matches1to2, matches1to2_tmplm);
- features2d_Features2d_drawMatchesKnn_14(img1.nativeObj, keypoints1_mat.nativeObj, img2.nativeObj, keypoints2_mat.nativeObj, matches1to2_mat.nativeObj, outImg.nativeObj);
- }
- #if (UNITY_IOS || UNITY_WEBGL) && !UNITY_EDITOR
- const string LIBNAME = "__Internal";
- #else
- const string LIBNAME = "opencvforunity";
- #endif
- // C++: void cv::drawKeypoints(Mat image, vector_KeyPoint keypoints, Mat& outImage, Scalar color = Scalar::all(-1), DrawMatchesFlags flags = DrawMatchesFlags::DEFAULT)
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawKeypoints_10(IntPtr image_nativeObj, IntPtr keypoints_mat_nativeObj, IntPtr outImage_nativeObj, double color_val0, double color_val1, double color_val2, double color_val3, int flags);
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawKeypoints_11(IntPtr image_nativeObj, IntPtr keypoints_mat_nativeObj, IntPtr outImage_nativeObj, double color_val0, double color_val1, double color_val2, double color_val3);
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawKeypoints_12(IntPtr image_nativeObj, IntPtr keypoints_mat_nativeObj, IntPtr outImage_nativeObj);
- // C++: void cv::drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_DMatch matches1to2, Mat& outImg, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_char matchesMask = std::vector<char>(), DrawMatchesFlags flags = DrawMatchesFlags::DEFAULT)
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawMatches_10(IntPtr img1_nativeObj, IntPtr keypoints1_mat_nativeObj, IntPtr img2_nativeObj, IntPtr keypoints2_mat_nativeObj, IntPtr matches1to2_mat_nativeObj, IntPtr outImg_nativeObj, double matchColor_val0, double matchColor_val1, double matchColor_val2, double matchColor_val3, double singlePointColor_val0, double singlePointColor_val1, double singlePointColor_val2, double singlePointColor_val3, IntPtr matchesMask_mat_nativeObj, int flags);
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawMatches_11(IntPtr img1_nativeObj, IntPtr keypoints1_mat_nativeObj, IntPtr img2_nativeObj, IntPtr keypoints2_mat_nativeObj, IntPtr matches1to2_mat_nativeObj, IntPtr outImg_nativeObj, double matchColor_val0, double matchColor_val1, double matchColor_val2, double matchColor_val3, double singlePointColor_val0, double singlePointColor_val1, double singlePointColor_val2, double singlePointColor_val3, IntPtr matchesMask_mat_nativeObj);
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawMatches_12(IntPtr img1_nativeObj, IntPtr keypoints1_mat_nativeObj, IntPtr img2_nativeObj, IntPtr keypoints2_mat_nativeObj, IntPtr matches1to2_mat_nativeObj, IntPtr outImg_nativeObj, double matchColor_val0, double matchColor_val1, double matchColor_val2, double matchColor_val3, double singlePointColor_val0, double singlePointColor_val1, double singlePointColor_val2, double singlePointColor_val3);
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawMatches_13(IntPtr img1_nativeObj, IntPtr keypoints1_mat_nativeObj, IntPtr img2_nativeObj, IntPtr keypoints2_mat_nativeObj, IntPtr matches1to2_mat_nativeObj, IntPtr outImg_nativeObj, double matchColor_val0, double matchColor_val1, double matchColor_val2, double matchColor_val3);
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawMatches_14(IntPtr img1_nativeObj, IntPtr keypoints1_mat_nativeObj, IntPtr img2_nativeObj, IntPtr keypoints2_mat_nativeObj, IntPtr matches1to2_mat_nativeObj, IntPtr outImg_nativeObj);
- // C++: void cv::drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_DMatch matches1to2, Mat& outImg, int matchesThickness, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_char matchesMask = std::vector<char>(), DrawMatchesFlags flags = DrawMatchesFlags::DEFAULT)
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawMatches_15(IntPtr img1_nativeObj, IntPtr keypoints1_mat_nativeObj, IntPtr img2_nativeObj, IntPtr keypoints2_mat_nativeObj, IntPtr matches1to2_mat_nativeObj, IntPtr outImg_nativeObj, int matchesThickness, double matchColor_val0, double matchColor_val1, double matchColor_val2, double matchColor_val3, double singlePointColor_val0, double singlePointColor_val1, double singlePointColor_val2, double singlePointColor_val3, IntPtr matchesMask_mat_nativeObj, int flags);
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawMatches_16(IntPtr img1_nativeObj, IntPtr keypoints1_mat_nativeObj, IntPtr img2_nativeObj, IntPtr keypoints2_mat_nativeObj, IntPtr matches1to2_mat_nativeObj, IntPtr outImg_nativeObj, int matchesThickness, double matchColor_val0, double matchColor_val1, double matchColor_val2, double matchColor_val3, double singlePointColor_val0, double singlePointColor_val1, double singlePointColor_val2, double singlePointColor_val3, IntPtr matchesMask_mat_nativeObj);
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawMatches_17(IntPtr img1_nativeObj, IntPtr keypoints1_mat_nativeObj, IntPtr img2_nativeObj, IntPtr keypoints2_mat_nativeObj, IntPtr matches1to2_mat_nativeObj, IntPtr outImg_nativeObj, int matchesThickness, double matchColor_val0, double matchColor_val1, double matchColor_val2, double matchColor_val3, double singlePointColor_val0, double singlePointColor_val1, double singlePointColor_val2, double singlePointColor_val3);
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawMatches_18(IntPtr img1_nativeObj, IntPtr keypoints1_mat_nativeObj, IntPtr img2_nativeObj, IntPtr keypoints2_mat_nativeObj, IntPtr matches1to2_mat_nativeObj, IntPtr outImg_nativeObj, int matchesThickness, double matchColor_val0, double matchColor_val1, double matchColor_val2, double matchColor_val3);
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawMatches_19(IntPtr img1_nativeObj, IntPtr keypoints1_mat_nativeObj, IntPtr img2_nativeObj, IntPtr keypoints2_mat_nativeObj, IntPtr matches1to2_mat_nativeObj, IntPtr outImg_nativeObj, int matchesThickness);
- // C++: void cv::drawMatches(Mat img1, vector_KeyPoint keypoints1, Mat img2, vector_KeyPoint keypoints2, vector_vector_DMatch matches1to2, Mat& outImg, Scalar matchColor = Scalar::all(-1), Scalar singlePointColor = Scalar::all(-1), vector_vector_char matchesMask = std::vector<std::vector<char> >(), DrawMatchesFlags flags = DrawMatchesFlags::DEFAULT)
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawMatchesKnn_10(IntPtr img1_nativeObj, IntPtr keypoints1_mat_nativeObj, IntPtr img2_nativeObj, IntPtr keypoints2_mat_nativeObj, IntPtr matches1to2_mat_nativeObj, IntPtr outImg_nativeObj, double matchColor_val0, double matchColor_val1, double matchColor_val2, double matchColor_val3, double singlePointColor_val0, double singlePointColor_val1, double singlePointColor_val2, double singlePointColor_val3, IntPtr matchesMask_mat_nativeObj, int flags);
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawMatchesKnn_11(IntPtr img1_nativeObj, IntPtr keypoints1_mat_nativeObj, IntPtr img2_nativeObj, IntPtr keypoints2_mat_nativeObj, IntPtr matches1to2_mat_nativeObj, IntPtr outImg_nativeObj, double matchColor_val0, double matchColor_val1, double matchColor_val2, double matchColor_val3, double singlePointColor_val0, double singlePointColor_val1, double singlePointColor_val2, double singlePointColor_val3, IntPtr matchesMask_mat_nativeObj);
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawMatchesKnn_12(IntPtr img1_nativeObj, IntPtr keypoints1_mat_nativeObj, IntPtr img2_nativeObj, IntPtr keypoints2_mat_nativeObj, IntPtr matches1to2_mat_nativeObj, IntPtr outImg_nativeObj, double matchColor_val0, double matchColor_val1, double matchColor_val2, double matchColor_val3, double singlePointColor_val0, double singlePointColor_val1, double singlePointColor_val2, double singlePointColor_val3);
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawMatchesKnn_13(IntPtr img1_nativeObj, IntPtr keypoints1_mat_nativeObj, IntPtr img2_nativeObj, IntPtr keypoints2_mat_nativeObj, IntPtr matches1to2_mat_nativeObj, IntPtr outImg_nativeObj, double matchColor_val0, double matchColor_val1, double matchColor_val2, double matchColor_val3);
- [DllImport(LIBNAME)]
- private static extern void features2d_Features2d_drawMatchesKnn_14(IntPtr img1_nativeObj, IntPtr keypoints1_mat_nativeObj, IntPtr img2_nativeObj, IntPtr keypoints2_mat_nativeObj, IntPtr matches1to2_mat_nativeObj, IntPtr outImg_nativeObj);
- }
- }
|