Merge pull request #9210 from whizzzkid/fixing-cuda

Fixing explicitly call download method for cuda::GpuMat object
This commit is contained in:
Nishant Arora
2017-08-17 10:32:53 -06:00
committed by Alexander Alekhin
parent a5b5684670
commit 98db804541
+9
View File
@@ -51,6 +51,10 @@ using namespace cv::cuda;
using xfeatures2d::SURF;
#endif
#ifdef HAVE_OPENCV_CUDAIMGPROC
# include "opencv2/cudaimgproc.hpp"
#endif
namespace {
struct DistIdxPair
@@ -583,7 +587,12 @@ void SurfFeaturesFinderGpu::find(InputArray image, ImageFeatures &features)
image_.upload(image);
ensureSizeIsEnough(image.size(), CV_8UC1, gray_image_);
#ifdef HAVE_OPENCV_CUDAIMGPROC
cv::cuda::cvtColor(image_, gray_image_, COLOR_BGR2GRAY);
#else
cvtColor(image_, gray_image_, COLOR_BGR2GRAY);
#endif
surf_.nOctaves = num_octaves_;
surf_.nOctaveLayers = num_layers_;