opencv3.0 函数学习5——medianBlur 中值滤波
2016-08-08 14:56
495 查看
3.medianBlur 中值滤波
中值滤波是基于排序统计理论的一种能有效抑制噪声的非线性信号处理技术,对脉冲噪声有良好的滤除作用,特别是在滤除噪声的同时,能够保护信号的边缘,使之不被模糊。这些优良特性是线性滤波方法所不具有的。此外,中值滤波的算法比较简单,也易于用硬件实现。
中值滤波就是将当前像素值替换为模板覆盖范围内的所有像素值中大小居中那一个:对于一个3*3的模板,第5大的就是中值:
(10,15,20,20,20,20,20,25,100)
中值滤波使得那些更亮(或者更暗)的点更像他周围的值。所以它在滤除噪音的同时,可以较好地保留细节轮廓。
函数说明
Blurs an image using the median filter.
The function smoothes an image using the median filter with the
ksize×ksize
aperture. Each channel of a multi-channel image is processed independently. In-place operation is supported.
Parameters
See alsobilateralFilter,
blur,
boxFilter,
GaussianBlur Examples: houghcircles.cpp, and
laplace.cpp.
中值滤波是基于排序统计理论的一种能有效抑制噪声的非线性信号处理技术,对脉冲噪声有良好的滤除作用,特别是在滤除噪声的同时,能够保护信号的边缘,使之不被模糊。这些优良特性是线性滤波方法所不具有的。此外,中值滤波的算法比较简单,也易于用硬件实现。
中值滤波就是将当前像素值替换为模板覆盖范围内的所有像素值中大小居中那一个:对于一个3*3的模板,第5大的就是中值:
(10,15,20,20,20,20,20,25,100)
中值滤波使得那些更亮(或者更暗)的点更像他周围的值。所以它在滤除噪音的同时,可以较好地保留细节轮廓。
函数说明
void cv::medianBlur | ( | InputArray | src, |
OutputArray | dst, | ||
int | ksize | ||
) |
The function smoothes an image using the median filter with the
ksize×ksize
aperture. Each channel of a multi-channel image is processed independently. In-place operation is supported.
Parameters
src | input 1-, 3-, or 4-channel image; when ksize is 3 or 5, the image depth should be CV_8U, CV_16U, or CV_32F, for larger aperture sizes, it can only be CV_8U. |
dst | destination array of the same size and type as src. |
ksize | aperture linear size; it must be odd and greater than 1, for example: 3, 5, 7 ... |
blur,
boxFilter,
GaussianBlur Examples: houghcircles.cpp, and
laplace.cpp.
相关文章推荐
- opencv3.0 函数学习 8——Canny 算子检测轮廓
- iOS-Opencv 基础学习五 ----中值滤波(medianBlur)和 双边滤波(bilateralFilter)
- OPENCV3.0 函数学习1——imread;namedWindow函数;imshow函数;imwrite函数
- opencv3.0 函数学习 3——equalizeHist 直方图均衡化
- opencv3.0 函数学习 7——adaptiveThreshold 区域自适应二值化
- [学习]实现split功能的函数
- Oracle分析函数学习笔记3
- 原创的ASP文件上传函数库,比动网、amao的都差了很多,不过是学习的好资料
- C++ Template学习笔记之函数模板(3)——模板实参推演
- C++ Template学习笔记之函数模板(7)——重载函数模板
- c++入门学习(函数模板)
- C++ Template学习笔记之函数模板(4)——显式模板实参
- [转载]SQlite 常用函数学习笔记
- oracle函数学习整理--字符处理
- C++ Template学习笔记之函数模板(2)——函数模板实例化
- [学习日记]vb.net里的两个重要的时间函数
- c#.net常用函数和方法集 (转帖:用于自己学习)
- C++ Template学习笔记之函数模板(1)——函数模板定义
- c++入门学习(函数)
- SQL深入学习(1)--时间函数