Commit b757d6cc authored by Ernest Galbrun's avatar Ernest Galbrun

some correction to make xfeature2d compilation work and adding 2d cuda features back

parent 12e1e11d
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,
}
else
{
cv::SURF surf;
cv::xfeatures2d::SURF surf;
std::vector<cv::KeyPoint> cpu_keypoints;
cv::Mat cpu_descriptors;
......
......@@ -43,11 +43,14 @@
#ifndef __OPENCV_PRECOMP_H__
#define __OPENCV_PRECOMP_H__
#include "opencv2/xfeatures2d/cuda.hpp"
#include "opencv2/xfeatures2d.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/private.hpp"
#include "opencv2/core/private.cuda.hpp"
//#include "opencv2/nonfree/cuda.hpp"
//#include "opencv2/core/private.cuda.hpp"
......
......@@ -42,7 +42,7 @@
#include "precomp.hpp"
#if 0
#if 1
using namespace cv;
using namespace cv::cuda;
......@@ -115,7 +115,7 @@ namespace
class SURF_CUDA_Invoker
{
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),
img_cols(img.cols), img_rows(img.rows),
use_mask(!mask.empty())
......
......@@ -94,7 +94,7 @@ CUDA_TEST_P(SURF, Detector)
std::vector<cv::KeyPoint> keypoints;
surf(loadMat(image), cv::cuda::GpuMat(), keypoints);
cv::SURF surf_gold;
cv::xfeatures2d::SURF surf_gold;
surf_gold.hessianThreshold = hessianThreshold;
surf_gold.nOctaves = nOctaves;
surf_gold.nOctaveLayers = nOctaveLayers;
......@@ -130,7 +130,7 @@ CUDA_TEST_P(SURF, Detector_Masked)
std::vector<cv::KeyPoint> keypoints;
surf(loadMat(image), loadMat(mask), keypoints);
cv::SURF surf_gold;
cv::xfeatures2d::SURF surf_gold;
surf_gold.hessianThreshold = hessianThreshold;
surf_gold.nOctaves = nOctaves;
surf_gold.nOctaveLayers = nOctaveLayers;
......@@ -160,7 +160,7 @@ CUDA_TEST_P(SURF, Descriptor)
surf.upright = upright;
surf.keypointsRatio = 0.05f;
cv::SURF surf_gold;
cv::xfeatures2d::SURF surf_gold;
surf_gold.hessianThreshold = hessianThreshold;
surf_gold.nOctaves = nOctaves;
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