1

I am trying to implement a simple filtering in an app. Which i have tested using python and works perfectly.

I am trying to achieve following:-

  1. Gray scale the image
  2. Gaussian blur image with kernal size 5x5
  3. Apply adaptive Gaussian Thresholding with disc size 15.

Probably i am asking very silly question but i am unable to pass ksize to GaussianBlur().

My code is:-

Imgproc.cvtColor(image, image, COLOR_BGR2GRAY);      
GaussianBlur(image, image,  How to pass size??,0,0);
Imgproc.adaptiveThreshold(Blurimage,BinarizedImage,ADAPTIVE_THRESH_GAUSSIAN_C,THRESH_BINARY,15);

I have tried CV_GAUSSIAN_5x5 , (5,5),Size (5,5), but nothing seem to work. It always throws me back to Imhproc.java file, line no 782 with error.

Error:(782, 54) error: cannot find symbol variable ksize and several other like this.

Everywhere its mentioned to pass the size but i wanst able to find any sample code.

Thank you for help.

Mayank
  • 353
  • 6
  • 20

0 Answers0