Outline • Periodic noise • Estimation of noise parameters • Restoration in the presence of noise only –spatial filtering Computer Vision & Digital Image Processing Image Restoration and Reconstruction II Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-1 Periodic noise Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-2 Sample periodic images and their spectra • Periodic noise typically arises from interference during image acquisition • Spatially dependent noise type • Can be effectively reduced via frequency domain filtering 50 50 100 100 150 150 200 200 250 250 50 100 150 200 250 50 50 100 100 150 150 200 Sample periodic images and their spectra 50 50 100 100 150 150 200 200 250 100 150 200 250 200 250 100 150 200 250 50 100 150 200 250 Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-4 Estimation of noise parameters • Noise parameters can often be estimated by observing the Fourier spectrum of the image – Periodic noise tends to produce frequency spikes • Parameters of noise PDFs may be known (partially) from sensor specification 250 50 150 250 50 Dr. D. J. Jackson Lecture 12-3 100 200 250 Electrical & Computer Engineering 50 50 100 150 200 250 – Can still estimate them for a particular imaging setup – One method • Capture a set of “flat” images from a known setup (i.e. a uniform gray surface under uniform illumination) • Study characteristics of resulting image(s) to develop an indicator of system noise 122 124 126 128 130 132 134 136 105 Electrical & Computer Engineering 110 115 120 125 130 135 140 145 150 Dr. D. J. Jackson Lecture 12-5 Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-6 Estimation of noise parameters (continued) Estimation of noise parameters (continued) • If only a set of images already generated by a sensor are available, estimate the PDF function of the noise from small strips of reasonably constant background intensity • Consider a subimage (S) and let ps(zi), i=0,1,2,…L-1 • denote the probability estimates of the intensities of the pixels in S. • L is the number of possible intensities in the image • The mean and the variance of the pixels in S are given by: • The shape of the noise histogram identifies the closest PDF match L −1 L −1 i =0 i =0 z = ∑ zi ps ( zi ) and σ 2 = ∑ ( zi − z ) 2 ps ( zi ) Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-7 Histograms from noisy strips of an area of an image – If the shape is Gaussian, then the mean and variance are all that is needed to construct a model for the noise (i.e. the mean and the variance completely define the Gaussian PDF) – If the shape is Rayleigh, then the Rayleigh shape parameters (a and b) can be calculated using the mean and variance – If the noise is impulse, then a constant (with the exception of the noise) area of the image is needed to calculate Pa and Pb probabilities for the impulse PDF Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-8 Restoration in the presence of noise only –spatial filtering • When only additive random noise is present, spatial filtering is commonly used to restore images • Common types – Mean filters – Order-Statistic filters – Adaptive filters Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-9 Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-10 Mean filters (arithmetic) Mean filters (geometric) • Arithmetic mean filter • Geometric mean filter – Computes the average value of a corrupted image g(x,y) in the area defined by a window (neighborhood) 1 fˆ ( x, y ) = ∑ g ( s, t ) mn ( s ,t )∈S xy 1 ⎡ ⎤ mn fˆ ( x, y ) = ⎢ ∏ g ( s, t )⎥ ⎣⎢( s ,t )∈S xy ⎦⎥ – The operation is generally implemented using a spatial filter of size m*n in which all coefficients have value 1/mn – A mean filter smoothes local variations in an image – Noise is reduced as a result of blurring Electrical & Computer Engineering – A restored pixel is given by the product of the pixels in an area defined by a window (neighborhood), raised to the power 1/mn Dr. D. J. Jackson Lecture 12-11 – Achieves smoothing comparable to the arithmetic mean filter, but tends to loose less detail in the process Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-12 Arithmetic and geometric mean filter examples Mean filters (harmonic) • Harmonic mean filter – A restored pixel is given by the expression fˆ ( x, y ) = mn ∑ ( s ,t )∈S xy 1 g ( s, t ) – Works well for salt noise (fails for pepper noise) – Works well for Gaussian noise also Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-13 Mean filters (contraharmonic) Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-14 Contraharmonic mean filter examples • Contraharmonic mean filter – A restored pixel is given by the expression fˆ ( x, y ) = ∑ g ( s, t ) Q +1 ( s ,t )∈S xy ∑ g ( s, t ) Q ( s ,t )∈S xy – – – – – Q is the order of the filter Works well for salt and pepper noise (cannot do both simultaneously) +Q eliminates pepper noise, -Q eliminates salt noise Q=0 → arithmetic mean filter Q=-1 → harmonic mean filter Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-15 Contraharmonic mean filter examples Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-17 Electrical & Computer Engineering Dr. D. J. Jackson Lecture 12-16
© Copyright 2024