Ψηφιακή Επεξεργασία Εικόνας - PDF

Description
ΠΑΝΕΠΙΣΤΗΜΙΟ ΙΩΑΝΝΙΝΩΝ ΑΝΟΙΚΤΑ ΑΚΑΔΗΜΑΪΚΑ ΜΑΘΗΜΑΤΑ Ψηφιακή Επεξεργασία Εικόνας Αποκατάσταση και ανακατασκευή εικόνας Διδάσκων : Αναπληρωτής Καθηγητής Νίκου Χριστόφορος Άδειες Χρήσης Το παρόν εκπαιδευτικό

Please download to get full document.

View again

of 27
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information
Category:

Jobs & Career

Publish on:

Views: 12 | Pages: 27

Extension: PDF | Download: 0

Share
Transcript
ΠΑΝΕΠΙΣΤΗΜΙΟ ΙΩΑΝΝΙΝΩΝ ΑΝΟΙΚΤΑ ΑΚΑΔΗΜΑΪΚΑ ΜΑΘΗΜΑΤΑ Ψηφιακή Επεξεργασία Εικόνας Αποκατάσταση και ανακατασκευή εικόνας Διδάσκων : Αναπληρωτής Καθηγητής Νίκου Χριστόφορος Άδειες Χρήσης Το παρόν εκπαιδευτικό υλικό υπόκειται σε άδειες χρήσης Creative Commons. Για εκπαιδευτικό υλικό, όπως εικόνες, που υπόκειται σε άλλου τύπου άδειας χρήσης, η άδεια χρήσης αναφέρεται ρητώς. Digital Image Processing Image Restoration and Reconstruction (Noise Removal) Christophoros h Nikou University of Ioannina - Department of Computer Science 2 Image Restoration and Reconstruction Things which we see are not by themselves what we see It remains completely unknown to us what the objects may be by themselves and apart from the receptivity of our senses. We know nothing but our manner of perceiving them. Immanuel Kant 3 Contents In this lecture we will look at image restoration techniques used for noise removal What is image restoration? Noise and images Noise models Noise removal using spatial domain filtering Noise removal using frequency domain filtering 4 What is Image Restoration? Image restoration attempts to restore images that have been degraded Identify the degradation process and attempt to reverse it Similar to image enhancement, but more objective 2 5 Noise and Images The sources of noise in digital images arise during image acquisition (digitization) and transmission Imaging sensors can be affected by ambient conditions Interference can be added to an image during transmission 6 Noise Model We can consider a noisy image to be modelled as follows: g( x, y) = f ( x, y) + η( x, y) where f(x, y) is the original image pixel, η(x, y) is the noise term and g(x, y) is the resulting noisy pixel If we can estimate the noise model we can figure out how to restore the image 3 7 Noise Models (cont...) There are many different models for the image noise term η(x, y): Gaussian Most common model Rayleigh Erlang (Gamma) Exponential Uniform Impulse Salt and pepper noise Erlang Gaussian Uniform Rayleigh Exponential Impulse 8 Noise Example The test pattern to the right is ideal for demonstrating the addition of noise The following slides will show the result of adding noise based on various models to this image Image Histogram to go here Histogram 4 9 Noise Example (cont ) 0 Noise Example (cont ) 5 Restoration in the presence of noise only We can use spatial filters of different kinds to remove different kinds of noise The arithmetic mean filter is a very simple one and is calculated as follows: fˆ( x, y) = g( s, mn / 9 / 9 / 9 / 9 / 9 / 9 / 9 / 9 / 9 ( s, S xy This is implemented as the simple smoothing filter It blurs the image. 2 Restoration in the presence of noise only (cont.) There are different kinds of mean filters all of which exhibit slightly different behaviour: Geometric Mean Harmonic Mean Contraharmonic Mean 6 3 Restoration in the presence of noise only (cont.) Geometric Mean: fˆ( x, y) = g( s, ( s, S xy Achieves similar smoothing to the arithmetic mean, but tends to lose less image detail. mn 4 Restoration in the presence of noise only (cont.) Harmonic Mean: fˆ( x, y) = ( s, g( s, Works well for salt noise, but fails for pepper noise. Also does well for other kinds of noise such as Gaussian noise. S xy mn 7 5 Restoration in the presence of noise only (cont.) Contraharmonic Mean: fˆ( x, y) = ( s, S ( s, S g( s, Q+ Q is the order of the filter. Positive values of Q eliminate pepper noise. Negative values of Q eliminate salt noise. It cannot eliminate both simultaneously. xy g( s, xy Q 6 Noise Removal Examples Original image 3x3 Arithmetic Mean Filter Image corrupted by Gaussian noise 3x3 Geometric Mean Filter (less blurring than AMF, the image is sharper) 8 7 Noise Removal Examples (cont ) Image corrupted by pepper noise at 0. Filtering with a 3x3 Contraharmonic Filter with Q=.5 8 Noise Removal Examples (cont ) Image corrupted by salt noise at 0. Filtering with a 3x3 Contraharmonic Filter with Q=-.5 9 9 Contraharmonic Filter: Here Be Dragons Choosing the wrong value for Q when using the contraharmonic filter can have drastic results Pepper noise filtered by a 3x3 CF with Q=-.5 Salt noise filtered by a 3x3 CF with Q=.5 20 Order Statistics Filters Spatial filters based on ordering the pixel values that make up the neighbourhood defined by the filter support. Useful spatial filters include Median filter Max and min filter Midpoint filter Alpha trimmed mean filter 0 2 Median Filter Median Filter: fˆ ( x, y) = median{ g( st, )} ( st, ) S xy Excellent at noise removal, without the smoothing effects that can occur with other smoothing filters. Particularly good when salt and pepper noise is present. 22 Max and Min Filter Max Filter: fˆ ( x, y) = Min Filter: fˆ( x, y) = max { g( s, } ( s, S xy min { g( s, } ( s, Max filter is good for pepper noise and Min filter is good for salt noise. S xy 23 Midpoint Filter Midpoint Filter: fˆ( x, y) = 2 max { g( s, } + ( s, S min { g( s, } ( s, xy S xy Good for random Gaussian and uniform noise. 24 Alpha-Trimmed Mean Filter Alpha-Trimmed Mean Filter: fˆ( x, y) = mn d ( s, g S xy r ( s, We can delete the d/2 lowest and d/2 highest grey levels. So g r (s, represents the remaining mn d pixels. 2 25 Noise Removal Examples Salt And Pepper at passes with a 33 3x3 median pass with a 3x3 median 3 passes with a 3x3 median Repeated passes remove the noise better but also blur the image 26 Noise Removal Examples (cont ) Image corrupted by Pepper noise Filtering above with a 3x3 Max Filter Image corrupted by Salt noise Filtering above with a 3x3 Min Filter 3 27 Noise Removal Examples (cont ) Image corrupted by uniform noise Filtering by a 5x5 Arithmetic Mean Filter Filtering by a 5x5 Median Filter Image further corrupted by Salt and Pepper noise Filtering by a 5x5 Geometric Mean Filter Filtering by a 5x5 Alpha- Trimmed Mean Filter (d=5) 28 Adaptive Filters The filters discussed so far are applied to an entire image without any regard for how image characteristics vary from one point to another. The behaviour of adaptive filters changes depending on the characteristics of the image inside id the filter region. We will take a look at the adaptive median filter. 4 29 Adaptive Median Filtering The median filter performs relatively well on impulse noise as long as the spatial density of the impulse noise is not large. The adaptive median filter can handle much more spatially dense impulse noise, and also performs some smoothing for non-impulse noise. 30 Adaptive Median Filtering (cont ) The key to understanding the algorithm is to remember that the adaptive median filter has three purposes: Remove impulse noise Provide smoothing of other noise Reduce distortion (excessive thinning or thickenning of object boundaries). 5 3 Adaptive Median Filtering (cont ) In the adaptive median filter, the filter size changes depending on the characteristics of the image. Notation: S xy = the support of the filter centerd at (x, y) z min = minimum grey level in S xy z max = maximum grey level in S xy z med = median of grey levels in S xy z xy = grey level at coordinates (x, y) S max =maximum allowed size of S xy 32 Adaptive Median Filtering (cont ) Stage A: A = z med z min A2 = z med z max If A 0 and A2 0, Go to stage B Else increase the window size If window size S max repeat stage A Else output z med Stage B: B = z xy z min B2 = z xy z max If B 0 and B2 0, output z xy Else output z med 6 33 Adaptive Median Filtering (cont ) Stage A: A = z med z min A2 = z med z max If A 0and A2 0, Go to stage B Else increase the window size If window size S max repeat stage A Else output z med Stage A determines if the output of the median filter z med is an impulse or not (black or white). If it is not an impulse, we go to stage B. If it is an impulse the window size is increased until it reaches S max or z med is not an impulse. Note that there is no guarantee that z med will not be an impulse. The smaller the the density of the noise is, and, the larger the support S max, we expect not to have an impulse. 34 Adaptive Median Filtering (cont ) Stage B: B = z xy z min B2 = z xy z max If B 0 and B2 0, output z xy Else output z med Stage B determines if the pixel value at (x, y), that is z xy, is an impulse or not (black or white). If it is not an impulse, the algorithm outputs the unchanged pixel value z xy. If it is an impulse the algorithm outputs the median z med. 7 35 Adaptive Filtering Example Image corrupted by salt and pepper noise with probabilities P a = P b =0.25 Result of filtering with a 7x7 median filter Result of adaptive median filtering with S max = 7 AMF preserves sharpness and details, e.g. the connector fingers. 36 Periodic Noise Typically arises due to electrical or electromagnetic interference. Gives rise to regular noise patterns in an image. Frequency domain techniques in the Fourier domain are most effective at removing periodic noise. 8 37 Band Reject Filters Removing periodic noise form an image involves removing a particular range of frequencies from that image. Band reject filters can be used for this purpose An ideal band reject filter is given as follows: W if D ( u, v ) D 0 2 W H ( u, v) = 0 if D0 D( u, v) D 2 W if D( u, v) D W Band Reject Filters (cont ) Ideal Band Butterworth th Gaussian Reject Filter Band Reject Band Reject Filter (of order ) Filter 9 39 Band Reject Filter Example Image corrupted by sinusoidal noise Fourier spectrum of corrupted image Butterworth band Filtered image reject filter 40 Notch Filters Rejects frequencies in a predefined neighbourhood around a center frequency. 20 4 Optimum Notch Filtering Several interference components (not a single burs. Removing completely the star-like components may also remove image information. 42 Optimum Notch Filtering (cont.) Apply the notch filter to isolate the bursts. Remove a portion of the burst. 2 43 Optimum Notch Filtering (cont.) A noise estimate in the DFT domain: Nkl (, ) = HklGkl (, ) (, ) In the spatial domain: η( mn, ) =I (, ) (, ) { H klgkl} Image estimate: f ˆ( mn, ) = g( mn, ) wmn (, ) η( mn, ) 44 Optimum Notch Filtering (cont.) f ˆ( mn, ) = gmn (, ) wmn (, ) η( mn, ) Compute the weight minimizing the variance over a local neighbourhood of the estimated image centered at (m,n): with a b σ ( mn, ) = fˆ( m k, n l) fˆ( mn, ) + + (2a+ )(2b+ ) k= a l= b a b ˆ f ( mn, ) = ˆ f ( m+ k, n+ l) (2a+ )(2b + ) k= a l= b Substituting the estimate in σ(m,n): yields: 2 22 45 Optimum Notch Filtering (cont.) a b σ( m, n) = {[ g( m+ k, n+ l) w( m+ k, n+ l) η( m+ k, n+ l) ] (2 a+ )(2 b+ ) k= a l= b gmn (, ) wmn (, ) η( mn, ) A simplification is to assume that the weight remains constant over the neighbourhood: wm ( + kn, + l) = wmn (, ), a k a, b l b a b σ( mn, ) = {[ gm ( + kn, + l) wmn (, ) η( m+ kn, + l) ] (2a+ )(2b+ ) k= a l= b } 2 [ gmn (, ) wmn (, ) η ( mn, )]} 2 46 Optimum Notch Filtering (cont.) To minimize the variance: σ ( mn, ) = 0 wmn (, ) yielding the closed-form solution: g( mn, ) η( mn, ) gmn (, ) η( mn, ) wmn (, ) = 2 2 η ( mn, ) η ( mn, ) More elaborated result is obtained for nonconstant weight w(m,n) at each pixel. 23 Τέλος Ενότητας Χρηματοδότηση Το παρόν εκπαιδευτικό υλικό έχει αναπτυχθεί στα πλαίσια του εκπαιδευτικού έργου του διδάσκοντα. Το έργο «Ανοικτά Ακαδημαϊκά Μαθήματα στο Πανεπιστήμιο Ιωαννίνων» έχει χρηματοδοτήσει μόνο τη αναδιαμόρφωση του εκπαιδευτικού υλικού. Το έργο υλοποιείται στο πλαίσιο του Επιχειρησιακού Προγράμματος «Εκπαίδευση και Δια Βίου Μάθηση» και συγχρηματοδοτείται από την Ευρωπαϊκή Ένωση (Ευρωπαϊκό Κοινωνικό Ταμείο) και από εθνικούς πόρους. Σημειώματα Σημείωμα Ιστορικού Εκδόσεων Έργου Το παρόν έργο αποτελεί την έκδοση.0. Έχουν προηγηθεί οι κάτωθι εκδόσεις: Έκδοση.0 διαθέσιμη εδώ. Σημείωμα Αναφοράς Copyright Πανεπιστήμιο Ιωαννίνων, Διδάσκων : Αναπληρωτής Καθηγητής Νίκου Χριστόφορος. «Ψηφιακή Επεξεργασία Εικόνας. Αποκατάσταση και ανακατασκευή εικόνας». Έκδοση:.0. Ιωάννινα 204. Διαθέσιμο από τη δικτυακή διεύθυνση: Σημείωμα Αδειοδότησης Το παρόν υλικό διατίθεται με τους όρους της άδειας χρήσης Creative Commons Αναφορά Δημιουργού - Παρόμοια Διανομή, Διεθνής Έκδοση 4.0 [] ή μεταγενέστερη. [] https://creativecommons.org/licenses/by-sa/4.0/
Related Search
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks