ocl::BruteForceMatcher fix wrong use of oclMat::ptr().
authorPeter Andreas Entschev <peter@entschev.com>
Thu, 5 Dec 2013 21:27:10 +0000 (19:27 -0200)
committerPeter Andreas Entschev <peter@entschev.com>
Thu, 5 Dec 2013 21:27:10 +0000 (19:27 -0200)
The oclMat::ptr() method was mistakenly used in ocl::BruteForceMatcher to pass a pointer to a oclMat object. The ptr() method returns a uchar pointer to the cl_mem data structure and this method will be removed.

modules/ocl/src/brute_force_matcher.cpp

index b1efe8c..b51d4f1 100644 (file)
@@ -677,7 +677,7 @@ void cv::ocl::BruteForceMatcher_OCL_base::matchCollection(const oclMat &query, c
     ensureSizeIsEnough(1, nQuery, CV_32S, imgIdx);
     ensureSizeIsEnough(1, nQuery, CV_32F, distance);
 
-    matchDispatcher(query, (const oclMat *)trainCollection.ptr(), trainCollection.cols, masks, trainIdx, imgIdx, distance, distType);
+    matchDispatcher(query, &trainCollection, trainCollection.cols, masks, trainIdx, imgIdx, distance, distType);
 
     return;
 }