When I used UMat to active OpenCL, it seems stack-overflow

asked 2015-12-14 00:44:22 -0600

I'm trying use opencv with opencl in my Android phone. When I call bilateralFilter with UMat type parameters, there was wrong:

OpenCV Error: Bad argument (Unknown/unsupported border type) in int cv::borderInterpolate(int, int, int), file D:\SourceCode\opencv\sources\modules\core\src\copy.cpp, line 951

and I add some print to check why the bordertype is wrong. Before invoke bilateralFilter, the print is :

pirntf("d:%d sigmaColor:%f sigmaSpace %f\n",size,sigmaColor,sigmaSpace);
bilateralFilter(srcImage, outImage, size,sigmaColor,sigmaSpace,BORDER_REPLICATE);

In bilateralFilter, the print is:

 void cv::bilateralFilter( InputArray _src, OutputArray _dst, int d,
                  double sigmaColor, double sigmaSpace,
                  int borderType )
 {   printf("d:%d,sigmaColor:%f,digmaSpace:%f\n",d,sigmaColor,sigmaSpace);
     printf("borderType is %d in bilateralFilter of %s\n",borderType,__FILE__);

The result confused me:

d:7 sigmaColor:14 sigmaSpace:3.5
d:7,sigmaColor:0.000000,digmaSpace:0.000000
borderType is -1228914980 in bilateralFilter of D:\SourceCode\opencv\sources\modules\imgproc\src\smooth.cpp**

It seems there is a stack error. But I can't understand why the parameter of d is correct and why the stack error occurs.

PS: If I used Mat, it is ok.

edit retag flag offensive close merge delete