added GpuFeature assertion to gpu::Canny

This commit is contained in:
Vladislav Vinogradov 2011-09-05 06:20:34 +00:00
parent b371bd68df
commit b2d5839af7
3 changed files with 4 additions and 1 deletions

View File

@ -77,6 +77,7 @@ namespace cv
FEATURE_SET_COMPUTE_20 = 20,
FEATURE_SET_COMPUTE_21 = 21,
GLOBAL_ATOMICS = FEATURE_SET_COMPUTE_11,
SHARED_ATOMICS = FEATURE_SET_COMPUTE_12,
NATIVE_DOUBLE = FEATURE_SET_COMPUTE_13
};

View File

@ -618,7 +618,7 @@ void cv::gpu::BruteForceMatcher_GPU_base::radiusMatch(const GpuMat& queryDescs,
}
};
CV_Assert(DeviceInfo().supports(GLOBAL_ATOMICS));
CV_Assert(TargetArchs::builtWith(GLOBAL_ATOMICS) && DeviceInfo().supports(GLOBAL_ATOMICS));
const int nQuery = queryDescs.rows;
const int nTrain = trainDescs.rows;

View File

@ -1782,6 +1782,7 @@ void cv::gpu::Canny(const GpuMat& src, CannyBuf& buf, GpuMat& dst, double low_th
{
using namespace cv::gpu::canny;
CV_Assert(TargetArchs::builtWith(SHARED_ATOMICS) && DeviceInfo().supports(SHARED_ATOMICS));
CV_Assert(src.type() == CV_8UC1);
if( low_thresh > high_thresh )
@ -1820,6 +1821,7 @@ void cv::gpu::Canny(const GpuMat& dx, const GpuMat& dy, CannyBuf& buf, GpuMat& d
{
using namespace cv::gpu::canny;
CV_Assert(TargetArchs::builtWith(SHARED_ATOMICS) && DeviceInfo().supports(SHARED_ATOMICS));
CV_Assert(dx.type() == CV_32SC1 && dy.type() == CV_32SC1 && dx.size() == dy.size());
if( low_thresh > high_thresh )