Search code examples
imageopencvimage-processingimagefiltergaussianblur

Blur image using Opencv in JAVA


I am working on image blur functionality. To achieve this I am using opencv with JAVA. But the blur ratio of the image is according to the quality of the uploaded image, means if I upload low quality image, then it blurs the image as expected, but if I upload high quality image, then it blurs the image in very minor proportion. How can I set the parameters to this line so that the blur effect is same for all images(means it is independent of the uploaded image quality) Imgproc.GaussianBlur(source, destination,new Size(39,39),0);


Solution

  • Try to convert all images in consistent size.

    example:If you have image with dimension 455x550 convert it into 300x300.Likewise you have one consistent dimension.convert all images in same dimension before applying blur effect.