From: Vladislav Vinogradov Date: Tue, 13 Nov 2012 13:54:17 +0000 (+0400) Subject: fixed bug in gpu::HoughLines X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~1314^2~1735^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a9919e01d0c857a568b6fa46fb3a878f6e6e83e1;p=platform%2Fupstream%2Fopencv.git fixed bug in gpu::HoughLines --- diff --git a/modules/gpu/src/cuda/hough.cu b/modules/gpu/src/cuda/hough.cu index ac65b36..ee4d025 100644 --- a/modules/gpu/src/cuda/hough.cu +++ b/modules/gpu/src/cuda/hough.cu @@ -236,7 +236,7 @@ namespace cv { namespace gpu { namespace device const int r = blockIdx.x * blockDim.x + threadIdx.x; const int n = blockIdx.y * blockDim.y + threadIdx.y; - if (r >= accum.cols - 2 && n >= accum.rows - 2) + if (r >= accum.cols - 2 || n >= accum.rows - 2) return; const int curVotes = accum(n + 1, r + 1);