Ringing in image processing

Source: Internet
Author: User

Ringing in image processing

In image processing, a filter is used to filter an image. If the selected frequency-domain filter has steep changes, the filter image will generate a "zhenling ", it refers to the fluctuation generated when the gray scale of the output image changes dramatically, just like the air fluctuation generated after the clock is hit. For example:


<喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + 08 m + 7bv9tqjA7b/JvavPwsPmwb3W1tT2x7/Bqs + 1xvDAtDo8L3A + CjxwPsa10/LU9se/fingerprint = "http://www.2cto.com/uploadfile/Collfiles/20141217/20141217085539200.gif" alt = "\">

Airspace Convolution:

F, g, and h are input images, enhancement images, and spatial filter functions respectively. F, G, and H are Fourier Transformations respectively. * Is A convolution symbol.

H (x, y) is the key to understanding low-pass filtering as a convolution process in the spatial domain: h (x, y) can be divided into two parts: the central part at the origin, and the peripheral part of the centralized cyclic distribution around the center. The former determines blurring, while the latter determines the ringing phenomenon. If the peripheral part has an obvious shock, then g (x, y) will have a ring. Using Fourier transform, we found that if the frequency-domain filter function has steep changes, the Fourier inverse transform's airspace filter function will fluctuate in the periphery.

Below are three commonly used low-pass filters: Ideal, butworth, and Gaussian. Analyze the features of their airspace filter functions to verify the above conclusions.

Ideal Type:

If the ideal filter type is used, a ring is triggered. It can be seen that the image outside the airspace filter function has a severe fluctuation.


Butworth:

For the order number, the first-order barworth does not have a "Ringing". As the order increases, the ringing phenomenon becomes more and more obvious. Take n = 2, we can see that the peripheral part of the airspace function has a shock.


Gaussian:

The Fourier transformation of the Gaussian function is still a Gaussian function, so the Gaussian filter does not produce a "Ring".



The above Image Generation Program:

Close all; clear all; d0 = 8; M = 60; N = 60; c1 = floor (M/2); c2 = floor (N/2 ); h1 = zeros (M, N); % ideal type h2 = zeros (M, N); % butworth type h3 = zeros (M, N); % Gaussian sigma = 4; n = 4; % barworth order for I = 1: M for j = 1: N d = sqrt (i-c1) ^ 2 + (j-c2) ^ 2 ); if d <= d0 h1 (I, j) = 1; else h1 (I, j) = 0; end h2 (I, j) = 1/(1 + (d/d0) ^ (2 * n); h3 (I, j) = exp (-d ^ 2/(2 * sigma ^ 2); endenddraw2 (h1, 'ide'); draw2 (h2, 'barws'); draw2 (h3, 'gauss '); function draw2 (h, name) figure; surf (h); title (strcat ('frequency Domain', name )); fx = abs (ifft2 (h); fx = fftshift (fx); figure; surf (fx); title (strcat ('airspace ', name ));

Note: The difference between fftshift and ifftshift is the same for the even row and column matrices, while the odd numbers complement each other and combine them to make them reversible.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.