De presentatie wordt gedownload. Even geduld aub

De presentatie wordt gedownload. Even geduld aub

Beeldverwerking Prof. dr. ir. W. Philips Didactisch materiaal bij de cursus Academiejaar 2011-2012

Verwante presentaties


Presentatie over: "Beeldverwerking Prof. dr. ir. W. Philips Didactisch materiaal bij de cursus Academiejaar 2011-2012"— Transcript van de presentatie:

1 Beeldverwerking Prof. dr. ir. W. Philips Didactisch materiaal bij de cursus Academiejaar 2011-2012 philips@telin.UGent.be http://telin.UGent.be/~philips/beeldv/ Tel: 09/264.33.85 Fax: 09/264.42.95

2 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 2 Copyright notice This powerpoint presentation was developed as an educational aid to the renewed course “Image processing” (Beeldverwerking), taught at the University of Gent, Belgium as of 1998. This presentation may be used, modified and copied free of charge for non-commercial purposes by individuals and non-for-profit organisations and distributed free of charge by individuals and non-for-profit organisations to individuals and non-for-profit organisations, either in electronic form on a physical storage medium such as a CD-rom, provided that the following conditions are observed: 1.If you use this presentation as a whole or in part either in original or modified form, you should include the copyright notice “© W. Philips, Universiteit Gent, 1998- 2002” in a font size of at least 10 point on each slide; 2.You should include this slide (with the copyright conditions) once in each document (by which is meant either a computer file or a reproduction derived from such a file); 3. If you modify the presentation, you should clearly state so in the presentation; 4.You may not charge a fee for presenting or distributing the presentation, except to cover your costs pertaining to distribution. In other words, you or your organisation should not intend to make or make a profit from the activity for which you use or distribute the presentation; 5. You may not distribute the presentations electronically through a network (e.g., an HTTP or FTP server) without express permission by the author. In case the presentation is modified these requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the presentation, and can be reasonably considered independent and separate works in themselves, then these requirements do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the presentation, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. In particular note that condition 4 also applies to the modified work (i.e., you may not charge for it). “Using and distributing the presentation” means using it for any purpose, including but not limited to viewing it, presenting it to an audience in a lecture, distributing it to students or employees for self-teaching purposes,... Use, modification, copying and distribution for commercial purposes or by commercial organisations is not covered by this licence and is not permitted without the author’s consent. A fee may be charged for such use. Disclaimer: Note that no warrantee is offered, neither for the correctness of the contents of this presentation, nor to the safety of its use. Electronic documents such as this one are inherently unsafe because they may become infected by macro viruses. The programs used to view and modify this software are also inherently unsafe and may contain bugs that might corrupt the data or the operating system on your computer. If you use this presentation, I would appreciate being notified of this by email. I would also like to be informed of any errors or omissions that you discover. Finally, if you have developed similar presentations I would be grateful if you allow me to use these in my course lectures. Prof. dr. ir. W. PhilipsE-mail: philips@telin.UGent.be Department of Telecommunications and Information ProcessingFax: 32-9-264.42.95 University of GentTel: 32-9-264.33.85 St.-Pietersnieuwstraat 41, B9000 Gent, Belgium

3 Zelfstudie: Pixeltransformaties (grijswaarden- en kleurtransformaties)

4 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 4 Het histogram Het histogram telt hoeveel keer iedere grijswaarde voorkomt CT-scan aantal Grijswaarde g 0255 128 h(g) In het voorbeeld wordt slechts een klein deel van het grijswaardenbereik benut  het contrast is laag

5 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 5 Histogramegalisatie... h(g) Grijswaarde g Voor 0255 128 h(g) Grijswaarde g Na 0255 128 g 0255 128 0 255 g’  Geeft niet: enkel 128 komt voor f (0) =f (1) =…=f (128) = 0

6 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 6...Histogramegalisatie... h(g) Grijswaarde g Voor 0255 128 h(g) Grijswaarde g Na 0255 128 g 0255 128 0 255 g’  onomkeerbaar!! f (0) =f (1) =…=f (128) = 0

7 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 7...Histogramegalisatie... We zoeken dus transformaties van de vorm f ( g ) moet een monotone functie zijn  pixels die witter zijn dan andere worden niet zwarter veel voorkomende grijswaarden moeten zo ver mogelijk uit elkaar liggen eventueel offeren we grijswaarden die weinig voorkomen hiervoor op Doel: het histogram “zo uniform mogelijk” maken, d.w.z. ervoor zorgen dat het aantal pixels met grijswaarde in [ f ( i ), f ( j ) [ evenredig is met f ( j ) -f ( i ) f ( k+ 1) =f ( k ) +ah k met h k het aantal pixels met originele grijswaarde g=k Oplossing: definieer de nieuwe grijswaarden als volgt: (voor k> 0) We kiezen f (0) en  zo dat het nieuwe grijswaardenbereik [ 0, 255 ] wordt:  f (0) = 0, met N het totaal aantal pixels

8 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 8...Histogramegalisatie Probleem: de nieuwe grijswaarden zijn niet noodzakelijk geheel (voor k > 0) met  x  het grootste geheel getal niet groter dan x Besluit: Controle: aantal pixels nu in [ f ( i ), f ( j ) [ = aantal pixels vroeger in [i, j[ inderdaad uniform! (voor k > 0) Opmerking: alternatieve formule (vervang [ f ( i ), f ( j ) [ door ] f ( i ), f ( j ) ] in voorgaande redenering):

9 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 9 Histogramegalisatie: voorbeeld… De grijswaarden zijn uniform verspreid op macroscopisch vlak Er blijven gaten over; dit komt omdat de histogramegalisatie het aantal grijswaarden niet doet toenemen h(g) Grijswaarde g Voor 0255 128 g=f(g) Grijswaarde f(g) Na 0255 128 h(g) (en meestal doet afnemen!) beide intervallen bevatten ongeveer evenveel pixels

10 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 10 …Histogramegalisatie: voorbeeld Het beeld is veel contrastrijker geworden, eigenlijk een beetje teveel, want men begint de artefacten te zien Origineelna egalisatie

11 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 11 h(g) Grijswaarde f ( g ) 0255 128 Manuele contrastaanpassing Manuele contrastaanpassing... Men kan ook zelf een functie f ( g ) vooropstellen Histogramegalisatie h(g) Grijswaarde f ( g ) 0255 128

12 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 12... Manuele contrastaanpassing De artefacten zijn minder zichtbaar na egalisatiena manuele aanpassing

13 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 13 Voorbeeld Origineel na egalisatiena manuele aanpassing

14 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 14 Bereken lokaal in het beeld een optimale f k, l ( g ) in vierkante gebieden gecentreerd rond evenredig verdeelde punten op een rooster Adaptieve histogramegalisatie… f k, l -1 ( g ) f k- 1, l-1 ( g ) f k -1, l ( g ) f k, l ( g )  1-1-  1-1- Bereken voor elk punt ( x,y ) een specifieke f ( g ) door bilineaire interpolatie: f ( g ) = (1 -  )(1 -  ) f k- 1, l- 1 ( g ) +  (1 -  ) f k, l- 1 ( g ) +(1 -  )  f k- 1, l ( g ) +  f k, l ( g )  hierdoor worden artefacten t.g.v. van abrupte veranderingen in f ( g ) vermeden

15 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 15 Opmerkingen Bij de gewone contrastegalisatie kan het nuttig zijn de lokale histogramegalisatiefuncties aan te passen, b.v. als volgt: f ( k+ 1) =f ( k ) +a min (h k, q ) met q een experimenteel te bepalen parameter Er bestaan egalisatietechnieken die geen uniform histogram nastreven, maar b.v. eerder een exponentieel histogram Bovenstaande aanpassingen kunnen ook worden toegepast op de f k,l ( g ) in de adaptieve methode Er bestaan veel varianten van de adaptieve techniek, b.v.: Clahe=Contrast-limited Adaptive Histogram Egalisation

16 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 16 Histogramaanpassing Clahe Clahe (Contrast-limited Adaptive Histogram Egalisation) geeft betere resultaten dan histogramegalisatie origineelClahe

17 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 17 Contrastaanpassing bij kleurenbeelden Bij kleurenbeelden wil men meestal enkel de helderheid beïnvloeden men past ofwel dezelfde transformatie toe op de R, G en B (verkeerd!) ofwel transformeert men V in de HSV-ruimte (redelijke benadering) na histogramegalisatie in HSVorigineel De enige correcte oplossing om tint en saturatie te behouden is echter L * in de L * a * b * -ruimte transformeren

18 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 18  = 2 Bij gammacorrectie is Gammacorrectie... origineel  = 2 (op V in HSV)  = 2 (op R, G en B) Soms past men de  -correctie toch toe op de 3 RGB- componenten afzonderlijk Bij kleurenbeelden wil men meestal weer enkel de helderheid beïnvloeden  toepassen op V in HSV (redelijke benadering) ofwel op L * in de L * a * b * -ruimte (correct) (b.v. als correctie voor monitorkarakteristiek)

19 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 19  = 0.5...Gammacorrectie Zo zou het TV-beeld er uitzien indien in de TV- studio geen  -correctie werd toegepast origineel  = 0.5 (op V in HSV)  = 0.5 (op R, G en B) zie “Simulatie van uitschakelen  -correctie”

20 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 20 De kleureneditor van het programma “xv” Kleurenmap Histogramaanpassing Saturatie Tintaanpassing

21 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 21 Origineel echografiebeeldColor-enhanced (ischemia) Kunstmatige kleur In het palet van een grijswaardenbeeld vervangt men enkele grijswaarden door kleuren om de beelden gemakkelijker te interpreteren

22 Bijkomend materiaal zelfstudie

23 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 23 Gamut-hermapping “perceptive remapping”: alle kleuren vervangen door nieuwe kleuren met de zelfde tint en intensiteit maar monotoon gedesatureerd originele kleuren hermapte kleuren gamut van weergave- systeem gamut van beeld Voordeel relatieve saturatie van kleuren blijft bewaard

24 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 24 Gamut-hermapping “colorimetric remapping”: de reproduceerbare kleuren veranderen niet de niet-reproduceerbare kleuren worden vervangen door de meest gelijkende reproduceerbare kleuren kleuren die niet veranderen kleuren die veranderen “Colorimetric remapping” is het best voor beelden die weinig niet- reproduceerbare kleuren bevatten; zoniet is “perceptive remapping” het best

25 © W. Philips, Universiteit Gent, 1998-2012versie: 6/10/2011 02d. 25 Zonder  -correctie: camera monitor RGBRGB slechte kleur- reproductie R’, G’, B’ Simulatie van uitschakelen  -correctie  dit kan men simuleren door te stellen met  2 Met  -correctie: cameramonitor RGBRGB R’, G’, B’ nauwkeurige kleur- reproductie Hier werd het beeld gedigitaliseerd d.w.z. met  0.5


Download ppt "Beeldverwerking Prof. dr. ir. W. Philips Didactisch materiaal bij de cursus Academiejaar 2011-2012"

Verwante presentaties


Ads door Google