From c5669448a35289a0599e459cd53a995fb78d3ba1 Mon Sep 17 00:00:00 2001 From: Alexander Mordvintsev Date: Wed, 11 Jul 2012 17:13:43 +0000 Subject: [PATCH] work on features2d python interface --- .../include/opencv2/features2d/features2d.hpp | 4 ++-- modules/nonfree/include/opencv2/nonfree/features2d.hpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/features2d/include/opencv2/features2d/features2d.hpp b/modules/features2d/include/opencv2/features2d/features2d.hpp index 3f6ecfb8d..4e46b27ae 100644 --- a/modules/features2d/include/opencv2/features2d/features2d.hpp +++ b/modules/features2d/include/opencv2/features2d/features2d.hpp @@ -1093,10 +1093,10 @@ protected: * For efficiency, BruteForceMatcher is templated on the distance metric. * For float descriptors, a common choice would be cv::L2. */ -class CV_EXPORTS BFMatcher : public DescriptorMatcher +class CV_EXPORTS_W BFMatcher : public DescriptorMatcher { public: - BFMatcher( int normType, bool crossCheck=false ); + CV_WRAP BFMatcher( int normType, bool crossCheck=false ); virtual ~BFMatcher() {} virtual bool isMaskSupported() const { return true; } diff --git a/modules/nonfree/include/opencv2/nonfree/features2d.hpp b/modules/nonfree/include/opencv2/nonfree/features2d.hpp index 074b9af9b..4fe27b1e2 100644 --- a/modules/nonfree/include/opencv2/nonfree/features2d.hpp +++ b/modules/nonfree/include/opencv2/nonfree/features2d.hpp @@ -58,15 +58,15 @@ namespace cv class CV_EXPORTS_W SIFT : public Feature2D { public: - explicit SIFT( int nfeatures=0, int nOctaveLayers=3, + CV_WRAP explicit SIFT( int nfeatures=0, int nOctaveLayers=3, double contrastThreshold=0.04, double edgeThreshold=10, double sigma=1.6); //! returns the descriptor size in floats (128) - int descriptorSize() const; + CV_WRAP int descriptorSize() const; //! returns the descriptor type - int descriptorType() const; + CV_WRAP int descriptorType() const; //! finds the keypoints using SIFT algorithm void operator()(InputArray img, InputArray mask, @@ -121,10 +121,10 @@ public: CV_WRAP int descriptorType() const; //! finds the keypoints using fast hessian detector used in SURF - CV_WRAP_AS(detect) void operator()(InputArray img, InputArray mask, + void operator()(InputArray img, InputArray mask, CV_OUT vector& keypoints) const; //! finds the keypoints and computes their descriptors. Optionally it can compute descriptors for the user-provided keypoints - CV_WRAP_AS(detect) void operator()(InputArray img, InputArray mask, + void operator()(InputArray img, InputArray mask, CV_OUT vector& keypoints, OutputArray descriptors, bool useProvidedKeypoints=false) const;