Eclipse gives error when using GaussianBlur with OpenCV for Android

后端 未结 2 1742
孤城傲影
孤城傲影 2021-01-18 04:05

I posted a little part of my code, cause i keep getting a strange error that I can\'t seem to get rid of. The problem can be found on this line: Imgproc.GaussianBlur

2条回答
  •  执笔经年
    2021-01-18 04:15

    This code works fine. Just reorder the parameters as you need.

    Imgproc.GaussianBlur(mGray, mGray, new Size(15,15),50);
    

    Size means that you will use it as kernel size. Also kernel size must be odd! 50 shows the kernel standard deviation in the X direction.

    Formula : sigma = 0.3 * ((kSize-1)*0.5 - 1) + 0.8

    Here sigma is passed 50 so sigmaX = sigmaY = 50

提交回复
热议问题