DOC PREVIEW
UW-Madison ECE 533 - Frequency Domain Filtering for Image Restoration Bandpass & Bandreject

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Introduction:For our project we decided to tackle the task of implementing designing softwareto perform various image degradation and restoration. We decided that Matlab would bethe best program to use, as our previous homework gave us some experience workingwith this software. Of course because our previous homework had covered a similartopic there had to be something that differentiated our project from the homework. Weaccomplish this by not using any of the built in Matlab functions for our program, butinstead wrote our own functions to emulate the ones found already within the program.Starting off we first decided to implement certain noise models, which will be list later onthe in the report, so we could test our filters later on in the program. After designingthese types of noise we needed build some filters to clean the images up, so we went withmany types of filters that our listed later on in this report also. This project while notnecessarily breaking any new ground in the image processing world will help us toexplore the nature what is actually happening when someone invokes a Matlab command.The hope is that someone reading this would gain a newfound respect for the work thatMatlab performs in the background. Now I will list the individual modules of ourprogram and discuss the functionality and any problems that we had while implementingthem.FREQUENCY DOMAIN FILTERING FOR IMAGE RESTORATIONBANDPASS & BANDREJECTThe process of eliminating sinusoidal noise using the frequency domain includes preprocessing, Fourier transform of the preprocessed image, creating a filter to block out unwanted frequencies, multiplying the filter and Fourier transformed image in the frequency domain, taking the inverse Fourier transform of that image, and finally to post process the image. The initial image which has some noise is defined as “f”, and the final image after post processing is complete is defined as “g”. Pre and post-processing includemultiplying the each pixel/element of the images “f” or “g1” by (-1)^(x+y). After preprocessing is complete, the Fourier transform is taken and the resulting image labeled F. Now the mask can be generated by a predefined equation, or a mask that the user wishes to use. After the mask is generated, it is multiplied by F in the frequency domain. The Inverse Fourier transform is then taken of the resulting image to get ‘g1’, and finally after post-processing, the image restoration is complete. In the case of the Band-pass andBand-reject filters, the masks consist of a circular region defined by an inner and outer radius of width W. Inside the walls of the circle the signal is 1, signaling a Band-pass filter or a 0, which signals a Band-reject filter. The three types of masks that we created for both Band-pass and Band-reject were Ideal, Butterworth, and Gaussian filters. The benefits of Gaussian and Butterworth filters are that in the frequency domain, they have very nice smooth edges with little or no ripple. The Fourier transform of the Ideal Band-pass filter is a sinc function, which, has very noticeable ripples in the final image, “g”. The equations used in the program are listed below:Ideal Band-pass/reject Filter:If- the distance from the origin of the frequency domain is greater than the selected frequency, Do, minus half of the width of the desired band-pass/reject filter, W and less than the selected frequency plus the width of the desired band-pass/rejectfilter;Then-the circular region defined is 1 inside the circle and zero outside for a band-pass. For a band-reject filter, inside the circular region is 0, and outside is a 1.Gaussian and Butterworth Filters (element-wise operations)Butterworth-Band-reject:Hbbr(u,v) = 1 / ( 1 + [( D(u,v)*W)/(D2(u,v) - Do2)]2NBand-pass:Hbbp(u,v) = 1-Hbbr(u,v)Gaussian-Band-reject:Hgbr(u,v) = 1- exp(.5*(D^2(u,v)-Do^2)/D(u,v)*W))^2)Band-pass:Hgbp(u,v) = 1-Hgbr(u,v)Notch FiltersNotch filters are done in the same way as the band-pass/reject filters except are filled in circles and not necessarily based at the origin. They “notch” into the surroundingmask, by becoming the opposite of the surrounding. So a notch reject, would be a small reject region in a larger pass region. This is done if there are any frequencies that are not based at the origin, but still affect the image and must be removed. One quality of the notches that is from the Fourier transform is the dual notches which are the same distanceand direction from the origin, but 180 degrees rotated around the origin. We made three types of notch filters Ideal, Butterworth, and Gaussian. The equations of these functions are listed in the Matlab code section of the report.Eliminating Atmospheric and Motion blur using Inverse FilteringIf an image is blurred there are a few ways that we took to try to fix the problem. One was to use the Gaussian Low-pass Filter, and the other was to use Inverse Filtering. Inverse filtering is the method of dividing the masked image in the frequency domain divided by the degradation function that caused the blur. This is probably not known and must be estimated. The problem with the inverse filter is that when the degradation function is really close to zero, the accuracy decreases and the resulting image is useless. A solution that we implemented is to use the Gaussian Low-pass Filter with a high radius,which seemed to give better, but not great results. The equations for the low-pass filter and the inverse filter are listed in the Matlab code.Spatial Filtering – Eliminating Salt and Pepper NoiseSalt and pepper noise is white and black pixels which occur in random positions on a picture. To eliminate this pesky noise, there are many options. One can average each pixel with the surrounding n pixels and save that value at the original pixel. This does a good job with very little noise, but doesn’t help very much with a large amount of noise. A better solution is to take the same amount of pixels that surround each pixel, and instead of averaging them, to sort them and take the middle value. This is called Median filtering and is much better at eliminating the noise and doesn’t have a blurring effect thatthe averaging method does. This works very well, but there is an improvement in this method called the Adaptive Median Filter. This method checks each pixel/element, and determines if the surrounding pixels and selects the median pixel to use.


View Full Document

UW-Madison ECE 533 - Frequency Domain Filtering for Image Restoration Bandpass & Bandreject

Documents in this Course
Load more
Download Frequency Domain Filtering for Image Restoration Bandpass & Bandreject
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Frequency Domain Filtering for Image Restoration Bandpass & Bandreject and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Frequency Domain Filtering for Image Restoration Bandpass & Bandreject 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?