Commit c16edac3 authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #72 from ernest-galbrun/compilation_errors_xfeatures2d

some correction to make xfeature2d compilation work and adding 2d cuda f...
parents ca5841ab b757d6cc
set(the_description "Contributed/Experimental Algorithms for Salient 2D Features Detection") set(the_description "Contributed/Experimental Algorithms for Salient 2D Features Detection")
ocv_define_module(xfeatures2d opencv_core opencv_imgproc opencv_features2d opencv_calib3d opencv_shape opencv_highgui opencv_videoio opencv_ml) ocv_define_module(xfeatures2d opencv_core opencv_cudaarithm opencv_imgproc opencv_features2d opencv_calib3d opencv_shape opencv_highgui opencv_videoio opencv_ml)
...@@ -86,8 +86,7 @@ PERF_TEST_P(Image, CUDA_SURF, ...@@ -86,8 +86,7 @@ PERF_TEST_P(Image, CUDA_SURF,
} }
else else
{ {
cv::SURF surf; cv::xfeatures2d::SURF surf;
std::vector<cv::KeyPoint> cpu_keypoints; std::vector<cv::KeyPoint> cpu_keypoints;
cv::Mat cpu_descriptors; cv::Mat cpu_descriptors;
......
...@@ -43,11 +43,14 @@ ...@@ -43,11 +43,14 @@
#ifndef __OPENCV_PRECOMP_H__ #ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__ #define __OPENCV_PRECOMP_H__
#include "opencv2/xfeatures2d/cuda.hpp"
#include "opencv2/xfeatures2d.hpp" #include "opencv2/xfeatures2d.hpp"
#include "opencv2/imgproc.hpp" #include "opencv2/imgproc.hpp"
#include "opencv2/core/utility.hpp" #include "opencv2/core/utility.hpp"
#include "opencv2/core/private.hpp" #include "opencv2/core/private.hpp"
#include "opencv2/core/private.cuda.hpp"
//#include "opencv2/nonfree/cuda.hpp" //#include "opencv2/nonfree/cuda.hpp"
//#include "opencv2/core/private.cuda.hpp" //#include "opencv2/core/private.cuda.hpp"
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#include "precomp.hpp" #include "precomp.hpp"
#if 0 #if 1
using namespace cv; using namespace cv;
using namespace cv::cuda; using namespace cv::cuda;
...@@ -115,7 +115,7 @@ namespace ...@@ -115,7 +115,7 @@ namespace
class SURF_CUDA_Invoker class SURF_CUDA_Invoker
{ {
public: public:
SURF_CUDA_Invoker(SURF_CUDA& surf, const GpuMat& img, const GpuMat& mask) : SURF_CUDA_Invoker(cv::cuda::SURF_CUDA& surf, const GpuMat& img, const GpuMat& mask) :
surf_(surf), surf_(surf),
img_cols(img.cols), img_rows(img.rows), img_cols(img.cols), img_rows(img.rows),
use_mask(!mask.empty()) use_mask(!mask.empty())
......
...@@ -94,7 +94,7 @@ CUDA_TEST_P(SURF, Detector) ...@@ -94,7 +94,7 @@ CUDA_TEST_P(SURF, Detector)
std::vector<cv::KeyPoint> keypoints; std::vector<cv::KeyPoint> keypoints;
surf(loadMat(image), cv::cuda::GpuMat(), keypoints); surf(loadMat(image), cv::cuda::GpuMat(), keypoints);
cv::SURF surf_gold; cv::xfeatures2d::SURF surf_gold;
surf_gold.hessianThreshold = hessianThreshold; surf_gold.hessianThreshold = hessianThreshold;
surf_gold.nOctaves = nOctaves; surf_gold.nOctaves = nOctaves;
surf_gold.nOctaveLayers = nOctaveLayers; surf_gold.nOctaveLayers = nOctaveLayers;
...@@ -130,7 +130,7 @@ CUDA_TEST_P(SURF, Detector_Masked) ...@@ -130,7 +130,7 @@ CUDA_TEST_P(SURF, Detector_Masked)
std::vector<cv::KeyPoint> keypoints; std::vector<cv::KeyPoint> keypoints;
surf(loadMat(image), loadMat(mask), keypoints); surf(loadMat(image), loadMat(mask), keypoints);
cv::SURF surf_gold; cv::xfeatures2d::SURF surf_gold;
surf_gold.hessianThreshold = hessianThreshold; surf_gold.hessianThreshold = hessianThreshold;
surf_gold.nOctaves = nOctaves; surf_gold.nOctaves = nOctaves;
surf_gold.nOctaveLayers = nOctaveLayers; surf_gold.nOctaveLayers = nOctaveLayers;
...@@ -160,7 +160,7 @@ CUDA_TEST_P(SURF, Descriptor) ...@@ -160,7 +160,7 @@ CUDA_TEST_P(SURF, Descriptor)
surf.upright = upright; surf.upright = upright;
surf.keypointsRatio = 0.05f; surf.keypointsRatio = 0.05f;
cv::SURF surf_gold; cv::xfeatures2d::SURF surf_gold;
surf_gold.hessianThreshold = hessianThreshold; surf_gold.hessianThreshold = hessianThreshold;
surf_gold.nOctaves = nOctaves; surf_gold.nOctaves = nOctaves;
surf_gold.nOctaveLayers = nOctaveLayers; surf_gold.nOctaveLayers = nOctaveLayers;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment