From 7a934f9ee0cc07ed5720b34a2c03867b320950d7 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 10 Dec 2015 11:21:16 -0500 Subject: [PATCH] Compatibility and bug fixes. --- modules/cudafeatures2d/src/cuda/orb.cu | 5 +++++ modules/cudafeatures2d/src/orb.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/cudafeatures2d/src/cuda/orb.cu b/modules/cudafeatures2d/src/cuda/orb.cu index a84c601fb5..926c80a9b4 100644 --- a/modules/cudafeatures2d/src/cuda/orb.cu +++ b/modules/cudafeatures2d/src/cuda/orb.cu @@ -45,6 +45,7 @@ #include #include #include +#include #include "opencv2/core/cuda/common.hpp" @@ -62,6 +63,7 @@ namespace cv { namespace cuda { namespace device { thrust::device_ptr loc_ptr(loc); thrust::device_ptr response_ptr(response); +#if THRUST_VERSION >= 100800 if(stream) { thrust::sort_by_key(thrust::cuda::par.on(stream), response_ptr, response_ptr + size, loc_ptr, thrust::greater()); @@ -69,6 +71,9 @@ namespace cv { namespace cuda { namespace device { thrust::sort_by_key(response_ptr, response_ptr + size, loc_ptr, thrust::greater()); } +#else + thrust::sort_by_key(response_ptr, response_ptr + size, loc_ptr, thrust::greater()); +#endif return n_points; } diff --git a/modules/cudafeatures2d/src/orb.cpp b/modules/cudafeatures2d/src/orb.cpp index ec1525374a..615ccc8db4 100644 --- a/modules/cudafeatures2d/src/orb.cpp +++ b/modules/cudafeatures2d/src/orb.cpp @@ -652,7 +652,7 @@ namespace Rect inner(edgeThreshold_, edgeThreshold_, sz.width - 2 * edgeThreshold_, sz.height - 2 * edgeThreshold_); buf_(inner).setTo(Scalar::all(255), stream); - cuda::bitwise_and(maskPyr_[level], buf_, maskPyr_[level], stream); + cuda::bitwise_and(maskPyr_[level], buf_, maskPyr_[level], cv::noArray(), stream); } }