![Digital Image Processing Chapter 5: Image Restoration Concept of Image Restoration](https://data.docslib.org/img/3a60ab92a6e30910dab9bd827208bcff-1.webp)
Digital Image Processing Chapter 5: Image Restoration Concept of Image Restoration Image restoration is to restore a degraded image back to the original image while image enhancement is to manipulate the image so that it is suitable for a specific application. Degradation model: g(x, y) = f (x, y) ∗h(x, y) +η(x, y) where h(x,y) is a system that causes image distortion and η(x,y) is noise. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Concept of Image Restoration g(x, y) = f (x, y) ∗h(x, y) +η(x, y) We can perform the same operations in the frequency domain, where convolution is replaced by multiplication, and addition remains as addition, because of the linearity of the Fourier transform. G(u,v) = F(u,v)H(u,v) + N(u,v) If we knew the values of H and N we could recover F by writing the above equation as N(u,v) F(u,v) = G(u,v) − H(u,v) However, as we shall see, this approach may not be practical. Even though we may have some statistical information about the noise, we will not know the value of n(x,y) or N(u,v) for all, or even any, values. A s we ll, di vidi ng b y H(i, j) will cause diff ulti es if there are values which are close to, or equal to, zero. Noise WdfiibddiihiilWe may define noise to be any degradation in the image signal, caused by external disturbance. If an image is being sent electronically from one place to another , via satellite or wireless transmission, or through networked cable, we may expect errors to occur in the image sig nal. These errors will app ear on the ima ge output in different ways depending on the type of disturbance in the signal. Usually we know what type of errors to expect, and hence the type of noise on the image; hence we can choose the most appropriate method for reducing the effects. Cleaning an image corrupted by noise is thus an important area of image restoration. We will investigate some of the standard noise forms, and the differen t me thod s of eli mi nati ng or red uci ng th ei r eff ect s on th e image. Salt and pepper noise Also call ed i mpul se noi se, sh ot noi se, or bi nary noi se. Thi s d egrad ati on can b e caused by sharp, sudden disturbances in the image signal; its appearance is randomly scattered white or black (or both) pixels over the image. To add noise, we use the Matlab function imnoise, which takes a number of different parameters. To add salt and pepper noise: >> cameraman=imread('cameraman.tif'); >> figure;imshow(cameraman); >> cameraman_sp=imnoise(cameraman,'salt & pepper'); >> figure;imshow(cameraman_sp); to add more or less noise we include an optional parameter, being a value between 0 and 1 indicating the fraction of pixels to be corrupted. Thus,for example >> cameraman_sp20=imnoise(cameraman,'salt & pepper',0.2); >> figure;i msh ow( cameraman_sp20) ; Gaussian noise Gauss ian no ise i s an id eali zed f orm of whi te noi se, whi ch i s caused by random fluctuations in the signal. We can observe white noise by watching a television which is slightly mistuned to a particular channel. Gaussian noise is white noise which is normallyygp distributed. If the image is represented as I, and the Gaussian noise by N, then we can model a noisy image by simply adding the two: I + N >> cameraman_gn=i mnoi se( cameraman,‘ gaussi an') ; >> figure;imshow(cameraman_gn); The gaussian parameter also can take optional values, giving the mean and variance of the noise. The default values are 0 and 0.1 Speckle noise Whereas G auss ian noi se can b e mod dlldbelled by rand om val ues add ddded to an image; speckle noise (or more simply just speckle) can be modelled by random values multiplied by pixel values , hence it is also called multiplicative noise. Speckle noise is a major problem in some radar applications. As above, imnoise can do sp eckle: >> cameraman_spk=imnoise(cameraman,'speckle'); >> figure;imshow(cameraman_spk); In Matlab, speckle noise is implemented as I(1 + N) Although Gaussian noise and speckle noise appear superficially similar, they are formed by two totally different methods, and, as we shall see, require different approaches for their removal. Periodic noise If th e i mage si gnal i s subj ect to a peri odi c, rath er th an a rand om disturbance, we might obtain an image corrupted by periodic noise. The effect is of bars over the image. The function imnoise does not have a periodic option, but it is quite easy to create, by addinggp a periodic matrix (usin g a tri gonometric function ), to an image: >> s=size(cameraman); >> [x , y]=meshgrid(1:s(1), 1:s(2)); >> p=sin(x/3+y/5)+1; >> cameraman_pn=(im2double(cameraman)+p/2)/2; >> fi gure;i msh ow( cameraman_pn) Salt and pepper noise, Gaussian noise and speckle noise can all be cleaned by using spatial filtering techniques . Periodic noise, however, requires the use of frequency domain filtering. This is because whereas the other forms of noise can be mod dlldelled as l ocal ld degrad dtiations, peri idiodic noi se i s a global effect. Noise Models NiNoise canno tbt be predi ditdcted btbut can b e approxi mat tlely d escrib ibdied in statistical way using the probability density function (PDF) Gaussian noise: 1 2 2 p(z) = e−( z−μ) / 2σ 2πσ Rayleigh noise ⎧2 2 ⎪ (z − a)e−( z−a) / b for z ≥ a p(z) = ⎨b ⎩⎪ 0 for z < a Erlang (Gamma) noise ⎧ ab zb−1 ⎪ (z − a)e−az for z ≥ 0 p(z) = ⎨(b −1)! ⎩⎪ 0 for z < 0 Noise Models (cont.) Exponential noise p(z) = ae−az Uniform noise ⎧ 1 ⎪ for a ≤ z ≤ b p(z) = ⎨b - a ⎩⎪ 0 othiherwise Il(lt&)iImpulse (salt & pepper) noise ⎧Pa for z = a ⎪ p(z) = ⎨Pb for z = b ⎪ ⎩0 otherwise PDF: Statistical Way to Describe Noise PDF tells how much each z value occurs. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Image Degradation with Additive Noise g(x, y) = f (x, y) +η(x, y) Degraded images Original image Histogram (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Image Degradation with Additive Noise (cont.) g(x, y) = f (x, y) +η(x, y) Degraded images Original image Histogram (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Estimation of Noise We cannot use the image histogram to estimate noise PDF. It i s b ett er t o use th e histogram of one area of an image that has constant intensity to estimate noise PDF. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Periodic Noise Periodic noise looks like dots In the frequency domain (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Periodic Noise Periodic Noise Periodic Noise Reduction by Freq. Domain Filtering Degraded image DFT Periodic noise can be red uced b y setting frequency components corresponding to noise to zero. Band reject filter Restored image (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Band Reject Filters UtliitfUse to eliminate frequency component tis in some b bdands Periodic noise from the previous slide that is Filtere d out. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Notch Reject Filters A no tc h re ject filt er i s used t o eli mi nat e some f requency component s. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Notch Reject Filter: Notch filter Degraded image DFT (freq. Domain) (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Noise Restored image Example: Image Degraded by Periodic Noise Degraded image DFT (no s hift) DFT of noise Noise Restored image (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition. Mean Filters Degradation model: g(x, y) = f (x, y) ∗h(x, y) +η(x, y) To remove this part Arithmetic mean filter or moving average filter (from Chapter 3) 1 fˆ(x, y) = ∑ g(s,t) mn (s,t)∈Sxyy Geometric mean filter mn = size of moving window 1 ⎛ ⎞ mn fˆ(x, y) = ⎜ g(s,t)⎟ ⎜ ∏ ⎟ ⎝ (s,t)∈Sxy ⎠ Geometric Mean Filter: Example Image OOgriginal corrupte image d by AWGN Image Image obtained obtained using a 3x3 using a 3x3 arithmetic geometitric mean filter mean filter (Images from Rafael C. Gonzalez and Richard E. AWGN: Additive White Gaussian Noise Wood, Digital Image Processing, 2nd Edition. Harmonic and Contraharmonic Filters Harmonic mean filter mn fˆ(x, y) = 1 WkWorks well llf for salt lti noise but fails for pepper noise ∑ g(s,t) (s,t)∈Sxy Contraharmonic mean filter mn = size of moving window Q+1 ∑ g(s,t) Positive Q is suitable for fˆ(x, y) = (s,t)∈Sxy elimi nati ng pepper noi se. g(s,t)Q Negative Q is suitable for ∑ eliminating salt noise. (s,t)∈Sxy Q = the filter order For Q = 0, the filter reduces to an arithmetic mean filter. For Q = -1, the filter reduces to a harmonic mean filter. Contraharmonic Filters: Example Image Image corrupted corrupted by pepper by salt noise with noise with prob.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages79 Page
-
File Size-