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

Σχετικά έγγραφα
Ψηφιακή Επεξεργασία Εικόνας

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

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 7η: Consumer Behavior Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

Homework 3 Solutions

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ

ΕΠΙΧΕΙΡΗΣΙΑΚΗ ΑΛΛΗΛΟΓΡΑΦΙΑ ΚΑΙ ΕΠΙΚΟΙΝΩΝΙΑ ΣΤΗΝ ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 8η: Producer Behavior Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

Μηχανική Μάθηση Hypothesis Testing

2 Composition. Invertible Mappings

D Alembert s Solution to the Wave Equation

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

Main source: "Discrete-time systems and computer control" by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1

Μικροβιολογία & Υγιεινή Τροφίμων

ΕΠΙΧΕΙΡΗΣΙΑΚΗ ΑΛΛΗΛΟΓΡΑΦΙΑ ΚΑΙ ΕΠΙΚΟΙΝΩΝΙΑ ΣΤΗΝ ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ

Ηλεκτρονικοί Υπολογιστές IV

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

Section 8.3 Trigonometric Equations

Ηλεκτρονικοί Υπολογιστές IV

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 10η: Basics of Game Theory part 2 Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

ΕΠΙΧΕΙΡΗΣΙΑΚΗ ΑΛΛΗΛΟΓΡΑΦΙΑ ΚΑΙ ΕΠΙΚΟΙΝΩΝΙΑ ΣΤΗΝ ΑΓΓΛΙΚΗ ΓΛΩΣΣΑ

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

Ψηφιακή Οικονομία. Διάλεξη 11η: Markets and Strategic Interaction in Networks Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

Example Sheet 3 Solutions

Τίτλος Μαθήματος: Εισαγωγή στους Ηλεκτρονικούς Υπολογιστές. Ενότητα: Μαθηματικές εκφράσεις στον κειμενογράφο

EE512: Error Control Coding

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

Ηλεκτρονικοί Υπολογιστές IV

Ηλεκτρονικοί Υπολογιστές IV

Solutions to Exercise Sheet 5

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

Matrices and Determinants

ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ

derivation of the Laplacian from rectangular to spherical coordinates

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

Ηλεκτρονικοί Υπολογιστές IV

Βασικές Αρχές Φαρμακοκινητικής

Ηλεκτρισμός & Μαγνητισμός

The Probabilistic Method - Probabilistic Techniques. Lecture 7: The Janson Inequality

SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM

SOLUTIONS TO MATH38181 EXTREME VALUES AND FINANCIAL RISK EXAM

Jesse Maassen and Mark Lundstrom Purdue University November 25, 2013

Areas and Lengths in Polar Coordinates

ST5224: Advanced Statistical Theory II

Solution Series 9. i=1 x i and i=1 x i.

Exercises 10. Find a fundamental matrix of the given system of equations. Also find the fundamental matrix Φ(t) satisfying Φ(0) = I. 1.

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

Ηλεκτρονικοί Υπολογιστές IV

HISTOGRAMS AND PERCENTILES What is the 25 th percentile of a histogram? What is the 50 th percentile for the cigarette histogram?

Areas and Lengths in Polar Coordinates

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

Concrete Mathematics Exercises from 30 September 2016

Ιστορία νεότερων Μαθηματικών

5.4 The Poisson Distribution.

Ανάκτηση Πληροφορίας

Problem Set 3: Solutions

forms This gives Remark 1. How to remember the above formulas: Substituting these into the equation we obtain with

Ηλεκτρισμός & Μαγνητισμός

Other Test Constructions: Likelihood Ratio & Bayes Tests

Εκκλησιαστικό Δίκαιο. Ενότητα 10η: Ιερά Σύνοδος της Ιεραρχίας και Διαρκής Ιερά Σύνοδος Κυριάκος Κυριαζόπουλος Τμήμα Νομικής Α.Π.Θ.

Statistical Inference I Locally most powerful tests

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 9η: Basics of Game Theory Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

ΕΛΛΗΝΙΚΗ ΔΗΜΟΚΡΑΤΙΑ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΡΗΤΗΣ. Ψηφιακή Οικονομία. Διάλεξη 13η: Multi-Object Auctions Mαρίνα Μπιτσάκη Τμήμα Επιστήμης Υπολογιστών

Συστήματα Διαχείρισης Βάσεων Δεδομένων

Instruction Execution Times

Business English. Ενότητα # 9: Financial Planning. Ευαγγελία Κουτσογιάννη Τμήμα Διοίκησης Επιχειρήσεων

Srednicki Chapter 55

TMA4115 Matematikk 3

ΟΡΟΛΟΓΙΑ -ΞΕΝΗ ΓΛΩΣΣΑ

Ηλεκτρονικοί Υπολογιστές I

European Human Rights Law

Ιστορία της μετάφρασης

Second Order RLC Filters

ΓΕΝΙΚΗ ΚΑΙ ΑΝΟΡΓΑΝΗ ΧΗΜΕΙΑ

Θεσμοί Ευρωπαϊκών Λαών Ι 19 ος -20 ος αιώνας

PARTIAL NOTES for 6.1 Trigonometric Identities

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions

Chapter 6: Systems of Linear Differential. be continuous functions on the interval

Γενικά Μαθηματικά Ι. Ενότητα 12: Κριτήρια Σύγκλισης Σειρών. Λουκάς Βλάχος Τμήμα Φυσικής ΑΝΟΙΚΤΑ ΑΚΑΔΗΜΑΪΚΑ ΜΑΘΗΜΑΤΑ

ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011

ω ω ω ω ω ω+2 ω ω+2 + ω ω ω ω+2 + ω ω+1 ω ω+2 2 ω ω ω ω ω ω ω ω+1 ω ω2 ω ω2 + ω ω ω2 + ω ω ω ω2 + ω ω+1 ω ω2 + ω ω+1 + ω ω ω ω2 + ω

Εκκλησιαστικό Δίκαιο

Ηλεκτρισμός & Μαγνητισμός

European Human Rights Law

Λογιστική Κόστους Ενότητα 12: Λογισμός Κόστους (2)

Partial Differential Equations in Biology The boundary element method. March 26, 2013

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

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

Θεσμοί Ευρωπαϊκών Λαών Ι 19 ος -20 ος αιώνας

Ηλεκτρονικοί Υπολογιστές IV

If we restrict the domain of y = sin x to [ π, π ], the restrict function. y = sin x, π 2 x π 2

Εισαγωγή σε μεθόδους Monte Carlo Ενότητα 3: Δειγματοληπτικές μέθοδοι

Ηλεκτρονικοί Υπολογιστές IV

ΟΡΟΛΟΓΙΑ -ΞΕΝΗ ΓΛΩΣΣΑ

Γενικά Μαθηματικά Ι. Ενότητα 15: Ολοκληρώματα Με Ρητές Και Τριγωνομετρικές Συναρτήσεις Λουκάς Βλάχος Τμήμα Φυσικής

Εκκλησιαστικό Δίκαιο

Ηλεκτρονικοί Υπολογιστές I

Overview. Transition Semantics. Configurations and the transition relation. Executions and computation

C.S. 430 Assignment 6, Sample Solutions

Transcript:

ΠΑΝΕΠΙΣΤΗΜΙΟ ΙΩΑΝΝΙΝΩΝ ΑΝΟΙΚΤΑ ΑΚΑΔΗΜΑΪΚΑ ΜΑΘΗΜΑΤΑ Ψηφιακή Επεξεργασία Εικόνας Μετασχηματισμοί έντασης και χωρικό φιλτράρισμα Διδάσκων : Αναπληρωτής Καθηγητής Νίκου Χριστόφορος Άδειες Χρήσης Το παρόν εκπαιδευτικό υλικό υπόκειται σε άδειες χρήσης Creative Commons. Για εκπαιδευτικό υλικό, όπως εικόνες, που υπόκειται σε άλλου τύπου άδειας χρήσης, η άδεια χρήσης αναφέρεται ρητώς.

Digital Image Processing Intensity Transformations (Histogram Processing) Christophoros Nikou cnikou@cs.uoi.gr University of Ioannina - Department of Computer Science 2 Contents Over the next few lectures we will look at image enhancement techniques working in the spatial domain: Histogram processing Spatial filtering Neighbourhood operations 1

Frequencies 3 Image Histograms The histogram of an image shows us the distribution of grey levels in the image Massively useful in image processing, especially in segmentation Grey Levels 4 Histogram Examples (cont ) 2

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 5 Histogram Examples (cont ) 6 Histogram Examples (cont ) 3

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 7 Histogram Examples (cont ) 8 Histogram Examples (cont ) 4

9 Histogram Examples (cont ) A selection of images and their histograms Notice the relationships between the images and their histograms Note that the high contrast image has the most evenly spaced histogram 10 Contrast Stretching We can fix images that have poor contrast by applying a pretty simple contrast specification The interesting part is how do we decide on this transformation function? 5

11 Histogram Equalisation Spreading out the frequencies in an image (or equalising the image) is a simple way to improve dark or washed out images. At first, the continuous case will be studied: r is the intensity of the image in [0, L-1]. we focus on transformations s=t(r): T(r) is strictly monotonically increasing. T(r) must satisfy: 0 T( r) L 1, for 0 r L 1 12 Histogram Equalisation (cont...) The condition for T(r) to be monotonically increasing guarantees that ordering of the output intensity values will follow the ordering of the input intensity values (avoids reversal of intensities). If T(r) is strictly monotonically increasing then the mapping from s back to r will be 1-1. The second condition (T(r) in [0,1]) guarantees that the range of the output will be the same as the range of the input. 6

13 Histogram Equalisation (cont...) a) We cannot perform inverse mapping (from s to r). b) Inverse mapping is possible. 14 Histogram Equalisation (cont...) We can view intensities r and s as random variables and their histograms as probability density functions (pdf) p r (r) and p s (s). Fundamental result from probability theory: If p r (r) and T(r) are known and s=t(r) is continuous and differentiable, then 1 ps ( s) pr ( r) pr ( r) ds dr dr ds 7

15 Histogram Equalisation (cont...) The pdf of the output is determined by the pdf of the input and the transformation. This means that we can determine the histogram of the output image. A transformation of particular importance in image processing is the cumulative distribution function (CDF) of a random variable: r s T( r) ( L 1) pr ( w) dw 0 16 Histogram Equalisation (cont...) It satisfies the first condition as the area under the curve increases as r increases. It satisfies the second condition as for r=l-1 we have s=l-1. To find p s (s) we have to compute r ds dt () r d ( L 1) pr ( w) dw dr dr ( L 1) pr ( r) dr 0 8

17 Histogram Equalisation (cont...) Substituting this result: ds ( L 1) pr ( r) dr to dr ps( s) pr( r) ds Uniform pdf yields 1 ps( s) pr( r) ( L 1) p ( r ) r 1, 0 s L 1 L 1 18 Histogram Equalisation (cont...) The formula for histogram equalisation in the discrete case is given k s T( r ) ( L 1) p ( r ) k k r j j 0 where r k : input intensity s k : processed intensity n j : the frequency of intensity j MN: the number of image pixels. ( L 1) k n j MN j 0 9

19 Histogram Equalisation (cont...) Example A 3-bit 64x64 image has the following intensities: k s T( r ) ( L 1) p ( r ) k k r j j 0 Applying histogram equalization: 0 s T( r ) 7 p ( r ) 7 p ( r ) 1.33 0 0 r j r 0 j 0 1 s T( r ) 7 p ( r ) 7 p ( r ) 7 p ( r ) 3.08 1 1 r j r 0 r 1 j 0 20 Histogram Equalisation (cont...) Example Rounding to the nearest integer: s 1.33 1 s 3.08 3 s 4.55 5 s 5.67 6 0 1 2 3 s 6.23 6 s 6.65 7 s 6.86 7 s 7.00 7 4 5 6 7 10

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 21 Histogram Equalization (cont ) Example Notice that due to discretization, the resulting histogram will rarely be perfectly flat. However, it will be extended. 22 Equalisation Transformation Function 11

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 23 Equalisation Examples 1 24 Equalisation Transformation Functions The functions used to equalise the images in the previous example 12

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 25 Equalisation Examples 2 26 Equalisation Transformation Functions The functions used to equalise the images in the previous example 13

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 27 Equalisation Examples (cont ) 3 4 28 Equalisation Transformation Functions The functions used to equalise the images in the previous examples 14

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 29 Histogram Specification Histogram equalization does not always provide the desirable results. Image of Phobos (Mars moon) and its histogram. Many values near zero in the initial histogram 30 Histogram Specification (cont...) Histogram equalization 15

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 31 Histogram specification (cont.) In these cases, it is more useful to specify the final histogram. Problem statement: Given p r (r) from the image and the target histogram p z (z), estimate the transformation z=t(r). The solution exploits histogram equalization. 32 Histogram specification (cont ) Equalize the initial histogram of the image: s T( r) ( L 1) pr ( w) dw Equalize the target histogram: s G( z) ( L 1) pz ( w) dw Obtain the inverse transform: z G 1 () s G In practice, for every value of r in the image: get its equalized transformation s=t(r). perform the inverse mapping z=g -1 (s), where s=g(z) is the equalized target histogram. r 0 r 0 1 ( T( r)) G( z) T( r) 16

33 Histogram specification (cont ) The discrete case: Equalize the initial histogram of the image: k s T( r ) ( L 1) p ( r ) k k r j j 0 ( L 1) k n j MN j 0 Equalize the target histogram: q sk G( zq) ( L 1) pz ( ri ) i 0 G( z) T( r) Obtain the inverse transform: 1 zq G ( sk) G 1 ( T( r k )) 34 Histogram Specification (cont...) Example Consider again the 3-bit 64x64 image: It is desired to transform this histogram to: p ( z ) 0.00 p ( z ) 0.00 p ( z ) 0.00 p ( z ) 0.15 z 0 z 1 z 2 z 3 p ( z ) 0.20 p ( z ) 0.30 p ( z ) 0.20 p ( z ) 0.15 z 4 z 5 z 6 z 7 with z 0, z 1, z 2, z 3, z 4, z 5, z 6, z 7. 0 1 2 3 4 5 6 7 17

35 Histogram Specification (cont...) Example The first step is to equalize the input (as before): s 1, s 3, s 5, s 6, s 6, s 7, s 7, s 7 0 1 2 3 4 5 6 7 The next step is to equalize the output: G( z ) 0 G( z ) 0 G( z ) 0 G( z ) 1 0 1 2 3 G( z ) 2 G( z ) 5 G( z ) 6 G( z ) 7 4 5 6 7 Notice that G(z) is not strictly monotonic. We must resolve this ambiguity by choosing, e.g. the smallest value for the inverse mapping. 36 Histogram Specification (cont...) Example Perform inverse mapping: find the smallest value of z q that is closest to s k : s T ( r ) G( z ) k i q s 1 G( z ) 0 0 0 s 3 G( z ) 0 s s s s s s 1 1 5 G( z ) 0 2 2 6 G( z ) 1 3 3 6 G( z ) 2 4 4 7 G( z ) 5 5 5 7 G( z ) 6 6 6 7 G( z ) 7 7 7 s k z q 1 3 3 4 5 5 6 6 7 7 e.g. every pixel with value s 0 =1 in the histogramequalized image would have a value of 3 (z 3 ) in the histogram-specified image. 18

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 37 Histogram Specification (cont...) Example Notice that due to discretization, the resulting histogram will rarely be exactly the same as the desired histogram. 38 Histogram Specification (cont...) Original image Histogram equalization 19

Images taken from Gonzalez & Woods, Digital Image Processing (2002) 39 Histogram Specification (cont...) Histogram equalization 40 Histogram Specification (cont...) Specified histogram Transformation function and its inverse Resulting histogram 20

41 Local Histogram Processing Image in (a) is slightly noisy but the noise is imperceptible. HE enhances the noise in smooth regions (b). Local HE reveals structures having values close to the values of the squares and small sizes to influence HE (c). 42 Summary We have looked at: Different kinds of image enhancement Histograms Histogram equalisation Histogram specification Next time we will start to look at spatial filtering and neighbourhood operations 21

Τέλος Ενότητας Χρηματοδότηση Το παρόν εκπαιδευτικό υλικό έχει αναπτυχθεί στα πλαίσια του εκπαιδευτικού έργου του διδάσκοντα. Το έργο «Ανοικτά Ακαδημαϊκά Μαθήματα στο Πανεπιστήμιο Ιωαννίνων» έχει χρηματοδοτήσει μόνο τη αναδιαμόρφωση του εκπαιδευτικού υλικού. Το έργο υλοποιείται στο πλαίσιο του Επιχειρησιακού Προγράμματος «Εκπαίδευση και Δια Βίου Μάθηση» και συγχρηματοδοτείται από την Ευρωπαϊκή Ένωση (Ευρωπαϊκό Κοινωνικό Ταμείο) και από εθνικούς πόρους.

Σημειώματα Σημείωμα Ιστορικού Εκδόσεων Έργου Το παρόν έργο αποτελεί την έκδοση 1.0. Έχουν προηγηθεί οι κάτωθι εκδόσεις: Έκδοση 1.0 διαθέσιμη εδώ. http://ecourse.uoi.gr/course/view.php?id=1126.

Σημείωμα Αναφοράς Copyright Πανεπιστήμιο Ιωαννίνων, Διδάσκων : Αναπληρωτής Καθηγητής Νίκου Χριστόφορος. «Ψηφιακή Επεξεργασία Εικόνας. Μετασχηματισμοί έντασης και χωρικό φιλτράρισμα». Έκδοση: 1.0. Ιωάννινα 2014. Διαθέσιμο από τη δικτυακή διεύθυνση: http://ecourse.uoi.gr/course/view.php?id=1126. Σημείωμα Αδειοδότησης Το παρόν υλικό διατίθεται με τους όρους της άδειας χρήσης Creative Commons Αναφορά Δημιουργού - Παρόμοια Διανομή, Διεθνής Έκδοση 4.0 [1] ή μεταγενέστερη. [1] https://creativecommons.org/licenses/by-sa/4.0/