noise models and noise reduction from images

22
SEMINAR REPORT ON NOISE MODELS AND REDUCTION OF NOISE FROM GRAYSCALE IMAGES SUBMITTED BY: KAVEESH NAYAK ROLL. NO. 11491049 M.TECH (COMPUTER ENGG.) UNIVERSITY COLLEGE OF ENGINEERING PUNJABI UNIVERSITY, PATIALA PUNJAB

Upload: kaveesh-nyk

Post on 17-Jan-2016

59 views

Category:

Documents


0 download

DESCRIPTION

Noise reduction M.Tech (UCoE)

TRANSCRIPT

Page 1: Noise models and noise reduction from images

SEMINAR REPORT

ON

NOISE MODELS AND REDUCTION OF NOISE FROM GRAYSCALE IMAGES

SUBMITTED BY:

KAVEESH NAYAK ROLL. NO. – 11491049

M.TECH (COMPUTER ENGG.)

UNIVERSITY COLLEGE OF ENGINEERING PUNJABI UNIVERSITY, PATIALA

PUNJAB

Page 2: Noise models and noise reduction from images

DECLARATION

I, Kaveesh Nayak student of M.Tech (Computer Engg) at University college of engg.

Punjabi university, Patiala. hereby declare that the report on “ NOISE MODELS AND

REDUCTION OF NOISE FROM GRAYSCALE IMAGES ” is the result of my own

work. I also acknowledge the other works / publications cited in the report.

Page 3: Noise models and noise reduction from images

ACKNOWLEDGEMENT

I am extremely grateful to Er. Ram Singh for helping me to carry out resarch in this topic.

I would also like to thank, Dr. Lakhwinder Kaur and other departmental faculty for their

support.

Kaveesh Nayak

UCOE, Punjabi university ,Patiala

(11491049)

Page 4: Noise models and noise reduction from images

INDEX

S.NO DESCRIPTION PAGE NO.

1 WHAT IS NOISE IN IMAGE 1

2 UNDERSTANDING NOISE IN VARIOUS SCENES 2

3 SOURCE OF IMAGE NOISE 2

4 ADDITIVE AND MULTIPLICATIVE NOISE 2

5 NOISE MODELS (TYPES OF NOISE) 3

6 NOISE REDUCTION IN IMAGES

9

7 REFERENCES 18

Page 5: Noise models and noise reduction from images

1

NOISE MODELS AND REDUCTION OF NOISE FROM GRAYSCALE IMAGES

1 – WHAT IS NOISE IN IMAGE ? Image noise is random variation of brightness or color information in images, and is usually an aspect of electronic noise. It can be produced by the sensor and circuitry of a scanner or digital camera. Image noise can also originate in film grain and in the unavoidable shot noise of an ideal photon detector. Image noise is an undesirable by-product of image capture that adds spurious and extraneous information. The original meaning of "noise" was and remains "unwanted signal"; unwanted electrical fluctuations in signals received by AM radios caused audible acoustic noise . By analogy unwanted electrical fluctuations themselves came to be known as "noise". Image noise is, of course, inaudible. Digital noise in photos taken with digital cameras is random pixels scattered all over the photo. It is a similar effect as “grain” in film photography and it degrades the photo

quality. Digital noise usually occurs when we take low light photos or you use very slow shutter speeds or very high sensitivity modes. When taking pictures with a digital camera an electronic sensor (also known as a CCD) built from many tiny pixels is used to measure the light for each pixel. The result is a matrix of pixels that represent the photo. As with any other electronic sensor the CCD is not perfect and includes some noise. In most lighting the light is significantly stronger than the noise. However in extreme scenes where the light is very low or when a high amplification is needed noise levels can become significant and result in pixels in the photos that include more noise data than real photo light data. Those pixels usually appear as random dots or stains on the photo. The magnitude of image noise can range from almost imperceptible specks on a digital photograph taken in good light, to optical and radioastronomical images that are almost entirely noise, from which a small amount of information can be derived by sophisticated processing .

Fig.1 A noisy grayscale image

Page 6: Noise models and noise reduction from images

2

2 – UNDERSTANDING NOISE IN VARIOUS SCENES

Low light : when the scene is dark the amount of light measured by each pixel of the CCD is low. When the light intensity is very low it can become too close to the level of noise naturally found in the CCD. In such cases some pixels can appear as noise because the noise level measured for them is significantly close or higher than the actual light intensity. Slow shutter speeds: when the shutter is kept open for a long time more noise will be introduced to the photo. A slow shutter speed translates to the CCD integrating more light per pixel. The effect can be easily understood as the CCD accumulating light in each pixel and measuring the total light over the shutter period of time. However at the same time the CCD is also “accumulating” noise. For that reason in slow shutter speed photos

some pixels will appear as noise because for these pixels the amount of noise integrated is significantly close to or higher than the actual light measured. High sensitivity modes: high sensitivity in digital photography is implemented by mechanisms that result in amplification. The CCD amplifies the measurements it takes. However there is no way to just amplify the actual photo light that falls on the CCD pixels instead the noise and the actual light are both amplified. The result is that the CCD becomes sensitive not only to light but also to its own noise. When too much amplification is applied some pixels will appear as noise. 3 - SOURCE OF IMAGE NOISE There are a number of sources of noise contamination. ->Heat generated might free electrons from the image sensor itself, thus contaminating the "true" photoelectrons. These "thermal electrons" give rise to a form of noise called thermal noise or dark current. ->Another type of noise is more akin to the 'grain' obtained by using a high ISO film. When we use a higher ISO, we are amplifying the signal we receive from the light photons. Unfortunately, as we amplify the signal, we also amplify the background electrical noise that is present in any electrical system. ->In low light, there is not enough light for a proper exposure and the longer we allow the image sensor to collect the weak signal, the more background electrical noise it also collects. In this case the background electrical noise may be higher than the signal. 4 – ADDITIVE AND MULTIPLICATIVE NOISE Noise is present in an image either in an additive or multiplicative form Let the original image “f(x,y)” and noise introduced is “n(x,y)” and the corrupted image be “w(x,y)”

where (x,y) gives us the pixel location. Then, if image gets additive noise then the corrupted image will be: w(x,y) = f(x,y) + n(x,y).

Page 7: Noise models and noise reduction from images

3

Similarly, if multiplicative noise is acquired during processing of image then the corrupted image will be: w(x,y) = f(x,y) * n(x,y). The above two operations will be done at pixel level. The digital image acquisition process converts an optical image into a electrical signal which is continuous then sampled . At every step in the process there are fluctuations caused by natural phenomena, adding a random value to the given pixel value. 5 – NOISE MODELS (TYPES OF NOISE) The main source of noise in digital images arises during image acquisition or during image transmission. The performance of image sensor is affected by variety of reasons such as environmental condition during image acquisition or by the quality of the sensing element themselves. For instance, during acquiring images with CCD camera, sensor temperature and light levels are major factors that affecting the amount of noise in the image after the resulting. Images are corrupted while during transmission of images. The principal reason of noise is due to interfering in the channel which is used for the images transmission. We can model a noisy image as follows:

g(x,y) = f(x,y) + h(x,y)

where f(x,y) is the original image pixel value and h(x,y) is the noise in the image and g(x,y) is the resulting noisy image. Noise models in image processing are of following type:

1) Uniform noise: The uniform noise is caused by quantizing the pixels of image to a number of distinct levels is known as quantization noise. It has approximately uniform distribution. In the uniform noise the level of the gray values of the noise are uniformly distributed across a specified range. Uniform noise can be used to generate any different type of noise distribution. This noise is often used to degrade images for the evaluation of image restoration algorithms. This noise provides the most neutral or unbiased noise. It has an approximately uniform distribution. Though it can be signal dependent, it will be signal independent if other noise sources are big enough to cause dithering, or if dithering is explicitly applied.

NOISE MODELS

Uniform Noise

Gaussian Noise

Salt & Pepper Noise

Gamma Noise

Rayleigh Distribution

Periodic Noise

Page 8: Noise models and noise reduction from images

4

Uniform noise can be analytically described by: • The gray level values of the noise are evenly distributed across a specific range. • Quantization noise has an approximately uniform distribution.

Histogram for a uniform noise is : 1/(b-a) for a < = z < = b

0 elsewhere

Uniform image noise looks like:

Original image Uniform noisy image

Page 9: Noise models and noise reduction from images

5

2) Gaussian noise: This noise has a probability density function (pdf) of the normal distribution. It is also known as Gaussian distribution. It is a major part of the read noise of an image sensor that is of the constant level of noise in the dark areas of the image. Gaussian noise is statistical noise having a probability density function (PDF) equal to that of the normal distribution, which is also known as the Gaussian distribution. In other words, the values that the noise can take on are Gaussian-distributed. The probability density function of a Gaussian random variable is given by:

where represents the grey level, the mean value and the standard deviation. A special case is white Gaussian noise, in which the values at any pair of times are identically distributed and statistically independent . In communication channel testing and modelling, Gaussian noise is used as additive white noise to generate additive white Gaussian noise. In telecommunications and computer networking, communication channels can be affected by wideband Gaussian noise coming from many natural sources, such as the thermal vibrations of atoms in conductors , shot noise, black body radiation from the earth and other warm objects, and from celestial sources such as the Sun. Gaussian noise in digital images: Principal sources of Gaussian noise in digital images arise during acquisition e.g. sensor noise caused by poor illumination and/or high temperature, or transmission e.g. electronic circuit noise. In digital image processing Gaussian noise can be reduced using a spatial filter, though when smoothing an image, an undesirable outcome may result in the blurring of fine-scaled image edges and details because they also correspond to blocked high frequencies. Conventional spatial filtering techniques for noise removal include: mean filtering, median filtering and Gaussian smoothing.

Page 10: Noise models and noise reduction from images

6

Gaussian noise for an image looks like:

Original Image Image with gaussian noise

3) Salt and pepper noise: The salt-and-pepper noise are also called shot noise, impulse noise or spike noise that is usually caused by faulty memory locations ,malfunctioning pixel elements in the camera sensors, or there can be timing errors in the process of digitization .The corrupted pixels are either set to the maximum value (which looks like snow in the image) or have single bits flipped over. In some cases, single pixels are set alternatively to zero or to the maximum value, giving the image a `salt and pepper' like appearance. Unaffected pixels always remain unchanged. The noise is usually quantified by the percentage of pixels which are corrupted. For 8-bit image the typical value for salt-noise and pepper noise is 0 and 255. Reasons for Salt and Pepper Noise: a. By memory cell failure. b. By malfunctioning of camera’s sensor cells. For a common salt and pepper noise , curve will be drawn as:

p(z) = pa for z = a p(z) = pb for z = b

p(z) = 0 otherwise where z are graylevels and p(z) is probability distribution

Page 11: Noise models and noise reduction from images

7

Salt and pepper noise in an image looks like:

Original Image Image with Salt and pepper noise

4) Rayleigh noise: Radar range and velocity images typically contain noise that can be modeled by the Rayleigh distribution. The probability density function of the Rayleigh distribution is:

Rayleigh noise for an image looks like:

Original Image Image with Rayleigh noise

Page 12: Noise models and noise reduction from images

8

5) Gamma noise: The noise can be obtained by the low-pass filtering of laser based images.

Here is what gamma noise looks like in a grayscale image:

Original Image Image with very high Gamma noise 6.)Periodic noise: Typically arises due to electromagnetic or electrical interference. Periodic noise gives rise to regular noise patterns in an image. Frequency domain techniques in the Fourier domain are most effective at removing periodic noise. Periodic noise may occur if the imaging equipment is subject to electronic disturbance of a repeating nature.

Page 13: Noise models and noise reduction from images

9

An image with a periodic noise looks like:

Original Image Image with periodic noise

Periodic noise in an image can be reduced by band reject filters. 6 – NOISE REDUCTION IN IMAGES FILTERS Filtering in an image processing is a basis function that is used to achieve many tasks such as noise reduction, interpolation, and re-sampling. Filtering image data is a standard process used in almost all image processing systems. The choice of filter is determined by the nature of the task performed by filter and behavior and type of the data. Filters are used to remove noise from digital image while keeping the details of image preserved is an necessary part of image processing. Filters can be described by different categories : -> Filtering without Detection: In this filtering there is a window mask which is moved across the observed image. This mask is usually of the size (2N+1)/2, in which N is a any positive integer. In this the centre element is the pixel of concern. When the mask is start moving from left top corner to the right bottom corner of the image, it perform some arithmetic operations without discriminating any pixel of image -> Detection followed by Filtering: This filtering involves two steps. In the first step it identify the noisy pixels of image and in second step it filters those pixels of image which contain noise. In this filtering also there is a mask which is moved across the image. It performs some arithmetic operations to detect the noisy pixels of image. Then the filtering operation is performed only on those pixels of image which are found to be noisy in the first step, keeping the non-noisy pixel of image intact. -> Hybrid Filtering: In hybrid filtering scheme, two or more filters are used to filter a corrupted location of a noisy image. The decision to apply a particular filter is based on

Page 14: Noise models and noise reduction from images

10

the noise level of noisy image at the test pixel location and the performance of the filter which is used on a filtering mask. Filter description:

g(x,y)= Corrupted image f(x,y) = Filtered image Filtering techniques:

1) Linear filter: In a linear filter, the output will change linearly with a change in the input. With this it could plot some sort of straight line from the relationship between the two. Linear filters are used to remove certain type of noise. Gaussian or Averaging filters are suitable for this purpose. These filters also tend to blur the sharp edges, destroy the lines and other fine details of image, and perform badly in the presence of signal dependent noise.

g(x,y)

Filter

Filtering Techniques

Linear filter

Non-linear filter

Wiener filter

Adaptive filter

f(x,y)

Page 15: Noise models and noise reduction from images

11

2) Non-linear filter: In a non linear filter there may or may not be a relationship between input and output. In recent years, a variety of non-linear median type filters such as weighted median, relaxed median, have been developed to overcome the shortcoming of linear filter. 3) Wiener filter: The goal of the Wiener filter is to compute a statistical estimate of an unknown signal using a related signal as an input and filtering that known signal to produce the estimate as an output. For example, the known signal might consist of an unknown signal of interest that has been corrupted by additive noise. The Wiener filter can be used to filter out the noise from the corrupted signal to provide an estimate of the underlying signal of interest. The Wiener filter is based on a statistical approach, and a more statistical account of the theory is given in the minimum mean-square error (MMSE) article. Typical deterministic filters are designed for a desired frequency response. However, the design of the Wiener filter takes a different approach. One is assumed to have knowledge of the spectral properties of the original signal and the noise, and one seeks the linear time-invariant filter whose output would come as close to the original signal as possible. Wiener filters are characterized by the following: Assumption: signal and noise are stationary linear stochastic processes with known spectral characteristics or known autocorrelation and cross-correlation Requirement: the filter must be physically realizable/causal Performance criterion: minimum mean-square error (MMSE) 4) Adaptive filter: An adaptive filter is a system with a linear filter that has a transfer function controlled by variable parameters and a means to adjust those parameters according to an optimization algorithm. Because of the complexity of the optimization algorithms, most adaptive filters are digital filters. Adaptive filters are required for some applications because some parameters of the desired processing operation are not known in advance or are changing. The closed loop adaptive filter uses feedback in the form of an error signal to refine its transfer function. The recording of a heart beat (an ECG), may be corrupted by noise from the AC mains. The exact frequency of the power and its harmonics may vary from moment to moment. One way to remove the noise is to filter the signal with a notch filter at the mains frequency and its vicinity, which could excessively degrade the quality of the ECG since the heart beat would also likely have frequency components in the rejected range. To circumvent this potential loss of information, an adaptive filter could be used. The adaptive filter would take input both from the patient and from the mains and would thus be able to track the actual frequency of the noise as it fluctuates and subtract the noise from the recording. Such an adaptive technique generally allows for a filter with a smaller rejection range, which means, in this case, that the quality of the output signal is more accurate for medical purposes.

Page 16: Noise models and noise reduction from images

12

Different type of linear and non linear filters: 1) Mean Filter: The mean filter is a simple spatial and linear filter .It is a sliding-window filter that replace the center value in the window. It replaces with the average mean of all the pixel values in the kernel or window. The window is usually square but it can be of any shape. The idea of mean filtering is simply to replace each pixel value in an image with the mean value of its neighbors, including itself. This has the effect of eliminating pixel values which are unrepresentative of their surroundings. Mean filtering is usually thought of as a convolution filter. Like other convolutions it is based around a kernel, which represents the shape and size of the neighborhood to be sampled when calculating the mean. Often a 3×3 square kernel is used, although larger kernels (e.g. 5×5 squares) can be used for more severe smoothing. Mean filter is best suited for gaussian & uniform noises.

Unfiltered values

5

7

3

9

2

1

4

6

8

Mean=(5+7+3+9+2+1+4+6+8)/9 = 5

Mean filtered

*

*

*

*

5

1

*

*

*

*

Page 17: Noise models and noise reduction from images

13

Image with gaussian noise Mean filtered image with mask 5X5

Image with salt and pepper noise Mean filtered image with mask 5X5

Image with uniform noise Mean filtered image with mask 5X5

Page 18: Noise models and noise reduction from images

14

Advantage: a. Easy to implement Disadvantage: a. Does not preserve details of an image 2) Median Filter: Median filter is a simple and powerful non-linear filter which is based order statistics. It is a non linear filter. It is easy to implement method of smoothing images. Median filter is used for reducing the amount of intensity variation between one pixel and the other pixel. In this filter, we do not replace the pixel value of image with the mean of all neighboring pixel values, we replaces it with the median value. Then the median is calculated by first sorting all the pixel values into ascending order and then replace the pixel being calculated with the middle pixel value. If the neighboring pixel of image which is to be consider contain an even numbers of pixels, than the average of the two middle pixel values is used to replace. The median filter gives best result when the impulse noise percentage is less than 0.1 %. When the quantity of impulse noise is increased the median filter not gives best result. It is useful for impulse noise.

Unfiltered values

52

17

3

19

26

11

24

61

88

3,11,17,19,24,26,52,61,88

Median = 24

Median filtered

*

*

*

*

24

1

*

*

*

*

Page 19: Noise models and noise reduction from images

15

Image with gaussian noise Median filtered image with mask 5X5

Image with salt and pepper noise Median filtered image with mask 5X5

Image with uniform noise Median filtered image with mask 5X5

Page 20: Noise models and noise reduction from images

16

Advantages: a. It is easy to implement. b. Used for de-noising different types of noises. Disadvantage: a. Median Filter tends to remove image details while reducing noise such as thin lines and corners. 3) MIN Filter: *To find the darkest points in an image. *Finds the minimum value in the area encompassed by the filter. *Reduces the salt noise as a result of the min operation. *The 0th percentile filter is min filter.

Image with gaussian noise Image with MIN filter 4) MAX Filter: *To find the brightest points in an image.

*Finds the maximum value in the area encompassed by the filter.

*Reduces the pepper noise as a result of the max operation.

*The 100th percentile filter is max filter.

These filters are collectively known as MINMAX filter

These are generally used to remove salt or pepper noise.

Page 21: Noise models and noise reduction from images

17

Image with gaussian noise Image with MAX filter

Page 22: Noise models and noise reduction from images

18

REFERENCES

1. Digital Image Procecssing Video Lectures by Prof. P.K Biswas(NPTEL) 2. Digital Image Processing by Rafael Gonzalez & Richard Woods 3. www.cs.bgu.ac.il/~dip122/wiki.files/Lectures/DIP3E_Chapter05_Art.pdf 4. “A Comparative Study of Various Types of Image Noise and Efficient Noise Removal Techniques” - Mr. Rohit Verma, Dr. Jahid Ali, International Journal of Advanced Research in Computer Science and Software Engineering Volume 3, Issue 10, October 2013