From f4b502dd0341c58354b98c5fe24e14296ed7e97d Mon Sep 17 00:00:00 2001 From: Jason von Nieda Date: Sun, 6 Mar 2016 13:49:44 -0800 Subject: [PATCH] Adds supports for the majority of features2d to the Java wrappers: * Adds the main features2d header to the parse list for the generator. * Removes the manual definition of drawKeypoints and drawMatches since these are now included in the main header. * Updates the generator to ignore SimpleBlobDetector, FlannBasedMatcher and DescriptorMatcher as these cause conflicts with the generator. This is okay since these were not previously included in the distribution anyway, so no harm is done. --- modules/features2d/misc/java/filelist | 1 + .../misc/java/src/cpp/features2d_manual.hpp | 11 ----------- modules/java/generator/gen_java.py | 2 ++ 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/modules/features2d/misc/java/filelist b/modules/features2d/misc/java/filelist index d4ff5ec262..0430b5423a 100644 --- a/modules/features2d/misc/java/filelist +++ b/modules/features2d/misc/java/filelist @@ -1 +1,2 @@ misc/java/src/cpp/features2d_manual.hpp +include/opencv2/features2d.hpp diff --git a/modules/features2d/misc/java/src/cpp/features2d_manual.hpp b/modules/features2d/misc/java/src/cpp/features2d_manual.hpp index abd66235a1..85b9489a28 100644 --- a/modules/features2d/misc/java/src/cpp/features2d_manual.hpp +++ b/modules/features2d/misc/java/src/cpp/features2d_manual.hpp @@ -408,17 +408,6 @@ enum // orientation will be drawn. }; -// Draw keypoints. -CV_EXPORTS_W void drawKeypoints( const Mat& image, const std::vector& keypoints, Mat& outImage, - const Scalar& color=Scalar::all(-1), int flags=0 ); - -// Draws matches of keypints from two images on output image. -CV_EXPORTS_W void drawMatches( const Mat& img1, const std::vector& keypoints1, - const Mat& img2, const std::vector& keypoints2, - const std::vector& matches1to2, Mat& outImg, - const Scalar& matchColor=Scalar::all(-1), const Scalar& singlePointColor=Scalar::all(-1), - const std::vector& matchesMask=std::vector(), int flags=0 ); - CV_EXPORTS_AS(drawMatches2) void drawMatches( const Mat& img1, const std::vector& keypoints1, const Mat& img2, const std::vector& keypoints2, const std::vector >& matches1to2, Mat& outImg, diff --git a/modules/java/generator/gen_java.py b/modules/java/generator/gen_java.py index 8c869756b2..339054d10e 100755 --- a/modules/java/generator/gen_java.py +++ b/modules/java/generator/gen_java.py @@ -13,6 +13,8 @@ else: class_ignore_list = ( #core "FileNode", "FileStorage", "KDTree", "KeyPoint", "DMatch", + #features2d + "SimpleBlobDetector", "FlannBasedMatcher", "DescriptorMatcher" ) const_ignore_list = (