Your Perfect Assignment is Just a Click Away
We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!

glass
pen
clip
papers
heaphones

Effects of Noises Effects Images on Filters

Effects of Noises Effects Images on Filters

Imaging Processing Lab Report

1.Abstract

The purpose of this report was to understand how different types of noise effect images and the effect that different filters have on these noises. These effects are observed through the use of imaging software Image J, which allows for filters to be added to images. There are 4 different images used throughout the report, the first 2 have salt and pepper and Gaussian noise respectively, while the last 2 are about the filters applied; Band-pass and notch filters. It can be seen from the results that each of salt-and-pepper and Gaussian noise require different filters to get rid of the noise; salt and pepper is best removed by median mask whereas Gaussian noise was removed by neither mask applied. The band-pass filter showed how different high and low-frequency values affect the image. The notch filter showed to be useful in removing periodic signal like the interference patterns in the Striped Lena images. Overall from the testing of the images, it is seen which filters best remove different noises.

2. Introduction

This report aims to detail how different noise affect images and how filters can be used to remove these noises in the spatial and frequency domains. Noises such as salt-and-pepper noise and Gaussian noise will be looked at in combination with how filtering in the spatial domain can remove these types of noise. Along with how filtering techniques like, band-pass and notch filters, are used to enhance images in the frequency domain.

3. Image processing practicals

3.1 Noise Removal

3.1.1 Background theory

“Noise is the unwanted, random fluctuation in the pixel values in an image, which results in a degradation of the image quality.’’ (Dougherty, 2009, p.37) The main sources of noise in digital imaging system are quantum noise, which is from the discrete nature of electromagnetic radiation and its interactions with matter, and electronic noise in the detectors. While these are the main sources of noise there are others which are identified according to their origin, including random noise and salt and pepper noise.

Salt and Pepper noise is caused by errors in data transmission. Corrupted pixels are either set to the maximum value or to zero, giving the image a ‘salt and pepper’ appearance. The salt and pepper appearance is dependent on the percentage of corrupted pixels; the more corrupted pixels the worse the appearance.

Gaussian noise comes from natural sources such as thermal vibrations in antennas and black body radiation. The word Gaussian refers to the way grey values are distributed. This type of noise is present in most medical imaging applications. (Dougherty, 2009 p.251)

Median filtering is a nonlinear process that cannot be achieved in the frequency domain. It replaces the value at the centre by the median pixel value in the area. Particularly helpful in removing salt and pepper noise. Salt = 225 pepper = 0 grey levels. In 5×5 area the median is the 13th largest value effects of median filter are – noise reduction and less blurring than averaging linear filter. Suppresses noise while preserving the edge contents. The neighbouring pixel values out of the 5×5 area will be ranked and the middle value becomes the new pixel value in the output image.

Average filtering is simply the average of the pixels contained in the area of the filter mask. The result of this is a smoothed image with reduced ‘’sharp’’ transitions in grey levels. (Ibrahem, 2013, p. 4) Normally either 3×3 or 5×5 window spatial filter where the centre value in the window is replaced with the average of all the pixel values in the window. (Schulze, 2001, para. 1)

A histogram is an accurate representation of the distribution of numerical data. When talking about histograms in relation to the digital imaging system, it is in the form of a grey-level histogram. A grey-level histogram is a concise initial characterisation of an image showing the number of pixels anywhere in the image. Which can be used to assess its overall qualities and determine the required steps to process the image. Each pixel value is represented by a histogram bin whose height represents the number of pixels with that particular value.

3.1.2 Actual computer algorithm (operations)

Download the ‘’Image J’’ software

Open image ‘’NoisyS&Pskull’’ with Image J program

Select analyse, then histogram to open histogram and click on the live button

Select process then filters then Mean with a radius of 2

Note the changes in the histogram

Open original image ‘’NoisyS&Pskull’’

Open a new histogram

Select process ? filters ? Median with a radius of 2

Note changes in histogram

Capture final images with applied filters

Compare original, 1st and 2nd images and their histograms

Repeat steps 1-10 with “NoisyGskull’’ image

3.1.3 Results and discussion

Between the 3 images, you can clearly see the difference that each filter had on the original image. This is clear not only in the image itself but also in histograms. The histograms show how many pixels fall into each bin and are ordered across the x-axis from black to white. As seen in Figure 1 the dynamic range is between 0 and 225 with huge spikes at 0 and 255 this is because of the salt and pepper effect which has the whitest whites and darkest blacks in the most abundance.

In Figure 2 there aren’t the same big spikes at 0 and 255 in the histogram, it has a dynamic range between 7 and 205. While it has a steeper valley than the original image it is not as steep as that of figure 3. This is a result of the averaging mask reducing the salt and pepper noise by averaging the pixel values out, while this helps it doesn’t give an image of diagnostic value.

From Figure 3 histogram that the dynamic range is smaller than that of figure 2 with a minimum of 8 and a maximum of 199. Along with a smaller dynamic range, the histogram also shows that there is a steeper valley and that of Figure 2. These factors show that the image is of better pixel distribution than either of the other images. This is a result of the addition of the 5×5 median mask.

From Figures 1, 2 & 3 it can be greatly seen what kind off effect each mask has on the original image. While the averaging mask had some effect on removing the salt and pepper noise it doesn’t achieve the level of filtering that the 5×5 median mask does. Thus, making the median mask best for removing salt and pepper noise from images.

Figure 4, 5 & 6 are of ‘’NoisyGskull’’ image which is contaminated with Gaussian noise. While in the previous set of images the median mask was the best in removing the salt and pepper noise it doesn’t have the same effect on the Gaussian noise. The averaging mask however does have a slightly better affect in removing the noise. This is due to its smoothing properties, making it most useful in removing Gaussian noise.

3.2 Band-pass and notch filters

3.2.1 Background theory

Band-pass filters work by having a set low and high frequency. Any frequencies above or below these set frequencies are attenuated, while the frequencies in between fall into the “Pass band’’. These frequencies go on to form the output image. (Dougherty, 2009, p.228)

Notch filters are is when a reject band out of a band reject filter is narrow. (Dougherty, 2009, p.228) It is useful in removing periodic signal of clearly defined frequency, such as interference patterns. It achieves this by multiplying the particular frequencies by zero, effectively eliminating them from the both Fourier domain. This can cause some visual degradation as a result.

3.2.2 Actual computer algorithm (operations)

Axial Brain MRI

Open “axialbrainMRI’’ image with Image J software

Add filter through by selecting Process ? FFT ? Band-pass filter

Add values for both high and low frequencies

Select 40 for high and 3 for low (default settings)

Select display filter the ok

Capture image of both the display filter and ‘’axialbrainMRI’’

Repeat steps 1 -6 2 more times, selecting these values respectively

50 for high and 10 for low

90 for high and 15 for low

Striped Lena

Open ‘’Striped Lena’’ image with Image J software

Apply filter by selecting Process ? FFT ? FFT

Select paintbrush tool from the toolbar

Select black as paint colour

Paint the two diagonal spots in the magnitude image

Apply inverse transform by selecting Process ?FFT ?Inverse FFT

Remove remnants of stripes by painting out the streaks that pass through diagonal spots in the magnitude image

Apply inverse transform by selecting Process ? FFT ? Inverse FFT

Repeat steps 7 & 8 again if there are still remnants of the stripes left

3.2.3 Results and discussion

Figure 7 is the original image of the axial brain MRI while figures 8, 9 & 10 are the original image with the band-pass filter added. The images in each figure have a band-pass filter with a different set of applied high and low values. The high and low-frequency values act as a cut-off any values above for below are attenuated and the values left in the middle create the image. In figure 8 the default values of a high of 40 and a low of 3 were applied to the original image, this has shortened the grey scale, cutting out the darkest blacks and dulled the bright whites. Thus, the image has less contrast than the original, it is still the best out the 3 sets of values. Figures 9 & 10 set of values have made the image of even littler diagnostic value. In both images are fuzzier enough that the anatomy of the brain cannot be distinguished. It can be seen that as the high values have increased from the default values that the image has got blurrier. This is also true with the low values being increased above 3 that in the image has also become blurrier. Thus, from the values selected, the best set of values were a high of 40 and a low of 3.

Figure 7 – Original Axial Brain MRI with no filters applied

Figure 8 – High of 40 and low of 3

Figure 9 – High of 50 and Low of 10

Figure 10 – High of 90 and low of 15

Notch filtering is designed so that it is effective in removing interference patterns such as the stripes in the image Striped Lena is shown in figure 11. By applying the Fast Fourier Transform (FFT) it brings about the magnitude image, which shows 3 white spots/stripes. The two diagonal stripes represent the stripes on the image and the middle spot represents the image. As a result, if the two diagonal stripes of painted with a black dot like in figure 12, it results in the black stripes being removed from the centre of the image with only the stripes only being visible on the around the border of the image when the inverse FFT is applied. The remnants of the stripes can be removed from the image by painting out the remaining streaks of the 2 diagonals spots as shown in figure 13.

Figure 11 – Original Striped Lena image

Figure 12 – Striped Lena with notice filter applied

Figure 13 – Striped Lena image with notch filter applied

4. Summary or conclusions

From the investigation it has been showed that in the spatial domain that median masks give the image of greatest diagnostic value when removing salt-and-pepper noise from the image, removing the noise without blurring/smoothing the image like the averaging mask did. While the Averaging mask was best suited to removing Gaussian noise. In the frequency domain, it showed that the band-pass and notch filters worked best at removing different types of noise, resulting in an enhanced image of diagnostic value. As most of these noises can be present in Medical Imaging applications it is desirable that the imaging programs/systems have these filters built in or readily available as to allow for an image of the highest diagnostic value.

6. References.

Dougherty, G. (2009) Digital Image Processing for Medical Applications. Retrieved from Proquest EBook Central.

Ibrahem, W. (n.d.) Imaging Processing (Lecture 6). Retrieved from UO Technology website: http://uotechnology.edu.iq/ce/lecture%202013n/4th%20Image%20Processing%20_Lectures/DIP_Lecture6.pdf

Schulze, M. (2001). Mean Filter. What are the mean and median filters? Retrieved from https://www.markschulze.net/java/meanmed.html

Get Help With Your Essay
If you need assistance with writing your essay, our professional essay writing service is here to help!
Find out more

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: Topnotch Essay only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Topnotch Essay are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Topnotch Essay is known for timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Topnotch Essay, we have put in place a team of experts who answer to all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.