fixed bug in gpu::HoughLines
authorVladislav Vinogradov <vlad.vinogradov@itseez.com>
Tue, 13 Nov 2012 13:54:17 +0000 (17:54 +0400)
committerVladislav Vinogradov <vlad.vinogradov@itseez.com>
Tue, 13 Nov 2012 13:54:17 +0000 (17:54 +0400)
modules/gpu/src/cuda/hough.cu

index ac65b36..ee4d025 100644 (file)
@@ -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);