mirror of
https://github.com/opencv/opencv.git
synced 2025-06-11 11:45:30 +08:00
Merge pull request #9210 from whizzzkid/fixing-cuda
Fixing explicitly call download method for cuda::GpuMat object
This commit is contained in:
parent
a5b5684670
commit
98db804541
@ -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_;
|
||||
|
Loading…
Reference in New Issue
Block a user