Overview of Halcon image filtering methods and principles

Introduction

Image filtering, which is to suppress the noise of the target image while preserving the details of the image as much as possible, is an indispensable operation in image preprocessing. The quality of the processing effect will directly affect the effectiveness and analysis of subsequent image processing and analysis. reliability. (From Baidu Encyclopedia)

Halcon operator and algorithm principle

Basic filtering

a, mean filtering

mean_image
均值滤波是指任意一点的像素值,都是周围 N \times M 个像素值的均值
对图像内部的噪声及模糊图像有很好的作用
例如下图中,红色点的像素值是其周围蓝色背景区域像素值之和除25,25=5\times5 是蓝色区域的大小

Insert picture description here

b. Median filtering

madian_image
中值滤波是非线性的图像处理方法,在去噪的同时可以兼顾到边界信息的保留。
选一个含有奇数点的窗口W,将这个窗口在图像上扫描,
把窗口中所含的像素点按灰度级的升或降序排列,取位于中间的灰度值来代替该点的灰度值
对单个噪声具有很好的平滑作用,特别是椒盐噪声。

Insert picture description here

c, Gaussian filtering

gauss_filter
高斯滤波是一种线性平滑滤波,适用于消除高斯噪声,广泛应用于图像处理的减噪过程。 

In layman's terms, Gaussian filtering is the weighted average process of the entire image. The value of each pixel is obtained by weighted average of itself and other pixel values ​​in the neighborhood.
The specific operation of Gaussian filtering is to scan each pixel in the image with a template (or convolution, mask), and use the weighted average gray value of the pixels in the neighborhood determined by the template to replace the value of the center pixel of the template.
In order to overcome the shortcomings of the simple local averaging method (image blur), many local smoothing algorithms that preserve edges and details have been proposed. Their starting points are all focused on how to choose the size, shape and direction of the neighborhood, the average of parameters, and the weight coefficient of each store in the neighborhood.
Image Gaussian smoothing is also a method of smoothing the image based on the idea of ​​neighborhood averaging. In image Gaussian smoothing, when the image is averaged, pixels at different positions are given different weights. Gaussian smoothing is different from simple smoothing. It gives different weights to pixels in different positions when averaging pixels in the neighborhood. The Gaussian templates for the 3\times3 and 5\times5 neighborhoods are shown in the figure below.
Insert picture description here
Insert picture description here
Gaussian filtering makes the neighboring pixels have higher importance, and calculates the weighted average of the surrounding pixels, and the closer pixels have a larger weight value. As shown in the figure below, the center position weight is 0.4.
Insert picture description here

d, guided filtering

guided_filter
引导滤波(导向滤波)不仅能实现双边滤波的边缘平滑,
而且在检测到边缘附近有很好的表现,可应用在图像增强、HDR压缩、图像抠图及图像去雾等场景

Reference guide filtering information
https://blog.csdn.net/sinat_36264666/article/details/77990790?locationNum=7&fps=1

Guess you like

Origin blog.csdn.net/cashmood/article/details/104782603