Add BFMatcher_OCL class alias for BruteForceMatcher_OCL.
authorpeng xiao <hisenxpress@gmail.com>
Wed, 15 May 2013 02:47:17 +0000 (10:47 +0800)
committerpeng xiao <hisenxpress@gmail.com>
Wed, 15 May 2013 02:47:17 +0000 (10:47 +0800)
This adds a similar interface with pure-cpp and gpu versions.

modules/ocl/include/opencv2/ocl/ocl.hpp

index 5c6a39e..1721069 100644 (file)
@@ -1245,6 +1245,11 @@ namespace cv
             explicit BruteForceMatcher_OCL(Hamming /*d*/) : BruteForceMatcher_OCL_base(HammingDist) {}
         };
 
+        class CV_EXPORTS BFMatcher_OCL : public BruteForceMatcher_OCL_base
+        {
+        public:
+            explicit BFMatcher_OCL(int norm = NORM_L2) : BruteForceMatcher_OCL_base(norm == NORM_L1 ? L1Dist : norm == NORM_L2 ? L2Dist : HammingDist) {}
+        };
         /////////////////////////////// PyrLKOpticalFlow /////////////////////////////////////
         class CV_EXPORTS PyrLKOpticalFlow
         {