OpenCv Learning Articles - Image Box Filtering Algorithm

1. Block filtering effect

    Image smoothing, also known as image blurring, is a frequently used operation in image processing. There are many reasons for image smoothing. Here we focus on using smoothing to reduce image noise. Because in the image, the energy of the noise is mostly concentrated in the low-frequency and middle-frequency parts of the amplitude spectrum, while in the higher frequency band, some important details are often overwhelmed by the noise. In an image, the so-called high-frequency part refers to the part where the pixel value of the image has a large drop, while the low-frequency part refers to the pixel value that is not much different or even the same as the pixel value next to it, and some details of the image are often composed of High-frequency information is displayed, and the noise doped in the image is often in the high-frequency band, which causes some detailed information to be submerged by the noise, which can be processed with different filters according to different types of noise. 

2. Algorithm principle


First, the kernel used in the box filtering is the above image. The kernel coefficient α determines the nature of the filtering:

in:


normalize indicates whether to perform normalization. The normalization coefficient is 1/width*height of the template, which is also the reciprocal of the sum of all elements in the kernel.

If normalization is not performed, the energy of the pixels to be filtered will be raised invisibly, and the pixel points will become brighter. After normalization, it is actually mean filtering.

In other words, mean filtering is a special form of block filtering.

3. Comparison renderings


The box-filtered pixels in the middle are noticeably brighter.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325764385&siteId=291194637