Gaussian Low-pass Filter in Android OpenCV.

大兔子大兔子 提交于 2021-01-27 21:22:58

问题


In order to make an image with better quality, I had do lots of research on filters. Filters are categorized into low, medium and high. After an analysis of these categories of filters, I conclude that Gaussian low-pass filter is the most suitable for me. And I had researched on how to code it in Android.

Finally I found that OpenCV has this function. After a few days of headache, I still can't find any solution since I am new to OpenCV. Does anyone can help me?


回答1:


Take a look at this tutorial:

http://docs.opencv.org/doc/tutorials/imgproc/gausian_median_blur_bilateral_filter/gausian_median_blur_bilateral_filter.html#smoothing

More specifically:

http://docs.opencv.org/modules/imgproc/doc/filtering.html?highlight=gaussianblur#gaussianblur

And for Android it is something like this:

Do not forget to import Imgproc.

import org.opencv.imgproc.Imgproc;
// (...)    
Imgproc.GaussianBlur(Mat src, Mat dst, Size ksize, double sigmaX, double sigmaY=0, int borderType=Imgproc.BORDER_DEFAULT );


来源:https://stackoverflow.com/questions/12658965/gaussian-low-pass-filter-in-android-opencv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!