Skip to content Skip to sidebar Skip to footer

Eclipse Gives Error When Using Gaussianblur With Opencv For Android

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(mGray, mGray, n

Solution 1:

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

Imgproc.GaussianBlur(mGray, mGray, newSize(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

Solution 2:

I got this solution from Alexander Smorkalov, and it worked. Just change the Imgproc.GaussianBlur(mGray, mGray, new Size (5,5), 2.2, 2); to Imgproc.GaussianBlur(mGray, mGray, new org.opencv.core.Size (5,5), 2.2, 2);

Post a Comment for "Eclipse Gives Error When Using Gaussianblur With Opencv For Android"