Hi:

    The parameter clamped_col is related with the blurring kernel size( ksX,
ksY parameters in this ocl kernel), and  the claped_col is dst_cols + MAX(
ksX/2, ksY/2) as the maximum.

     As we know,  the blurring kernel size is no more than dst_cols, so I
using  2*dst_cols and the (dst_cols + MAX(ksX/2, ksY/2)) is also right in
my opinion.

     Best Regards!
    --------------------------------------
     Baichuan Su


2013/11/6 Andrey Pavlenko <notifications@github.com>

> In modules/ocl/src/opencl/imgproc_calcHarris.cl:
>
> > @@ -134,7 +141,7 @@ __kernel void calcHarris(__global const float *Dx, __global const float *Dy, __g
> >          data[2][i] = dy_data[i] * dy_data[i];
> >      }
> >  #else
> > -    int clamped_col = min(dst_cols, col);
> > +    int clamped_col = min(2*dst_cols, col);
>
> @liuxing6666 <https://github.com/liuxing6666>, could you please describe
> the bug you're fixing and explain why it should be 2*dst_cols, but not
> dst_cols+1 or dst_cols*10?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Itseez/opencv/pull/1744/files#r7458326>
> .
>