Docsity
Docsity

Prüfungen vorbereiten
Prüfungen vorbereiten

Besser lernen dank der zahlreichen Ressourcen auf Docsity


Download-Punkte bekommen.
Download-Punkte bekommen.

Heimse Punkte ein, indem du anderen Studierenden hilfst oder erwirb Punkte mit einem Premium-Abo


Leitfäden und Tipps
Leitfäden und Tipps

Grundlagen Bildverarbeitung, Übungen von Bildverarbeitung

Größere Nachbarschaft: verschiedene Verarbeitungsfunktionen werden oft als. Masken (Templates, Windows, Filter) bezeichnet. Ein kleines Array (e.g. 3×3. Pixel) ...

Art: Übungen

2021/2022

Hochgeladen am 09.08.2022

PestoReisKlopapier
PestoReisKlopapier 🇩🇪

4.2

(20)

1 / 84

Toggle sidebar

Diese Seite wird in der Vorschau nicht angezeigt

Lass dir nichts Wichtiges entgehen!

bg1
Grundlagen Bildverarbeitung
Ao.Univ.-Prof. Dr. Andreas Uhl
WS 2005/2006
Abstract
The basis of this material are course notes compiled by students which
have been corrected and adapted by the lecturer. The students’ help is
gratefully acknowledged.
Some of the images are taken from websites without prior authoriza-
tion. As the document is only used for non-commercial purposes (teaching
students) we hope that nobody will be offended!
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54

Unvollständige Textvorschau

Nur auf Docsity: Lade Grundlagen Bildverarbeitung und mehr Übungen als PDF für Bildverarbeitung herunter!

Grundlagen Bildverarbeitung

Ao.Univ.-Prof. Dr. Andreas Uhl

WS 2005/

Abstract The basis of this material are course notes compiled by students which have been corrected and adapted by the lecturer. The students’ help is gratefully acknowledged. Some of the images are taken from websites without prior authoriza- tion. As the document is only used for non-commercial purposes (teaching students) we hope that nobody will be offended!

Contents

77 Beispiel Dynamic Programming: (a) Kantenbild (b) Graph mit Kosten (c) m¨ogliche Pfade nach E, A-E ist optimal (d) optimale

  • 1 Introduction
    • 1.1 Literature on Image Processing
    • 1.2 Overview
      • 1.2.1 Digital Image Processing
      • 1.2.2 Low level digital image processing
    • 1.3 Image Properties
      • 1.3.1 Color Representation
      • 1.3.2 Rasterung und Quantisierung
      • 1.3.3 Metric properites of digital images
      • 1.3.4 Histograms
    • 1.4 Image Representation
    • 1.5 Traditional Data Structures
      • 1.5.1 Matrices
      • 1.5.2 Chains
      • 1.5.3 Run length coding
      • 1.5.4 Topological Data Structures
      • 1.5.5 Relational Structures
    • 1.6 Hierarchical Data Structures
      • 1.6.1 Pyramids
      • 1.6.2 Quadtrees
    • 1.7 Perception
  • 2 Image Enhancement
    • 2.1 Spatial Domain Methoden
    • 2.2 Contrast Manipulierung & Modifizierung
      • 2.2.1 Amplitudenver¨anderungen
      • 2.2.2 Kontrast Modifikationen
      • 2.2.3 Histogrammmodifizierung
      • 2.2.4 Histogramm-Equalisierung
      • 2.2.5 Direkte Histogrammspezifikation
    • 2.3 Bildgl¨attung (image smoothing) & Denoising
      • 2.3.1 Neighbourhood Averaging
      • 2.3.2 Median Filtering
    • 2.4 Image Sharpening
    • 2.5 Methoden im Transformationsbereich
      • 2.5.1 Fouriertransformation
      • 2.5.2 Filterung im Frequenzbereich
      • 2.5.3 Wavelet Transformation
      • 2.5.4 Fourier vs. Wavelet
      • 2.5.5 Weitere Varianten der Wavelet Transformation
  • 3 Image Restauration
    • 3.1 Bildst¨orung
    • 3.2 Bestimmung der St¨orung
      • 3.2.1 Bildanalyse
      • 3.2.2 Experimentelle St¨orungsbestimmung
      • 3.2.3 St¨orungsbestimmung durch Modellierung
    • 3.3 St¨orungsbeseitigung
    • 3.4 Wiener Filterung
  • 4 Kantenerkennung
    • 4.1 Methoden mit 1. Ableitung
      • 4.1.1 Roberts Operator
      • 4.1.2 Kompass Operatoren
    • 4.2 Methoden mit der 2. Ableitung
      • 4.2.1 Laplace Operator
      • 4.2.2 Mexican Hat Operator
    • 4.3 Canny Edge Detector
    • 4.4 Line Finding Alogrithmen
      • 4.4.1 Einfache Kernel
      • 4.4.2 Hough Transformation
  • 5 Image Segmentation
    • 5.1 Thresholding
    • 5.2 Thresholding Variationen
    • 5.3 Wahl des Thresholds
    • 5.4 Kantenbasierte Verfahren
      • 5.4.1 Kantenbild Thresholding
      • 5.4.2 Edge Relaxation
      • 5.4.3 Kantenketten als Graphsuche
    • 5.5 Regionsbasierte Verfahren
      • 5.5.1 Region Merging
      • 5.5.2 Region Splitting
      • 5.5.3 Template Matching
    • 5.6 Watershed Segmentierung
  • 6 Morphologische Bildverarbeitung
    • 6.1 Morphological Image Processing
      • 6.1.1 Set Theory Nomenclature
      • 6.1.2 Erosion and Dilation
      • 6.1.3 Opening and Closing
    • 6.2 Shrinking
    • 6.3 Thinning
    • 6.4 Skeletonization
    • 6.5 Pruning
    • 6.6 Thickening
    • 6.7 Anwendung: Watershed Segmentierung
  • 7 Additional Topics
  • 1 source image List of Figures
  • 2 image as 2D-set of brightness values
  • 3 source image
  • 4 RGB decomposition of figure
  • 5 YUV decomposition of figure
  • 6 Rasterung von figure
  • 7 Quantization of figure
  • 8 pixel neighborhoods
  • 9 contiguity paradoxes
  • 10 grid types
  • 11 crack edges
  • 12 image histogram for figure
  • 13 images with same histogram
  • 14 chain data structure
  • 15 region adjacency graph
  • 16 relational data structure
  • 17 image pyramids
  • 18 T-pyramid data structure
  • 19 quadtree
  • 20 Grauwerttransformation
  • 21 Bild und Maske
  • 22 Grauwertbereichs Modifikation
  • 23 Kontrast Modifikation
  • 24 Kontrast Modifikation einer CT
  • 25 Typische Kontrastmodifikationen
  • 26 Kontrast Modifikation eines Myelins
  • 27 stetiges Histogramm
  • 28 equalisiertes Histogramm
  • 29 Histogramm Equalisierung
  • 30 Averaging mit 3 × 3 Maske
  • 31 Denoising
  • 32 Image Sharpening
  • 33 Arten des Gradientenbilds
  • 34 Origial image and its Fourier Spectrum (Magnitude)
  • 35 DFT Transformations
  • 36 Verschiedene Filter
  • 37 ILPF
  • 38 IHPF
  • 39 BPF
  • 40 Filterung spezieller Frequenzbereiche
  • 41 Wavelet Transformation
  • 42 2D Wavelet Transformation
  • 43 2D Wavelet Transformation Visualisierung 1. Ebene
  • 44 2D Wavelet Transformation Visualisierung 2.+3. Ebene
  • 45 Wavelet Transformation Beispiel
  • 46 Fourier and Wavelet Transformation
  • 47 Denoising im Wavelet/Fourier Bereich
  • 48 Denoising im Wavelet/Fourier Bereich: Ergebnisse
  • 49 A trous Visualisierung
  • 50 Beispiel: Gl¨attung als Bildst¨orung
  • 51 Beispiel Inverse Filterung
  • 52 Beispiel Inverse Filterung mit Rauschen
  • 53 Beispiel Pseudo Inverse Filterung
  • 54 Wiener Filterung
    • in der Graphik ?) 55 Visuell: 1. Ableitung vs. 2. Ableitung (wer findet die zwei Fehler
  • 56 Numerik: 1. vs. 2. Ableitung
  • 57 Roberts Operator
  • 58 Prewitt Operator
  • 59 Sobel Operator
  • 60 Sobel Operator Example
  • 61 Edge Detection Examples
  • 62 Mexican Hat
  • 63 LoG Example
  • 64 Edge Detection Examples: thresholding
  • 65 Canny Edge Detector: verschiedene σ
  • 66 Grundprinzip der Houghtransformation
  • 67 Alternative Geradendarstellung
  • 68 Beispiel der Houghtransformation
  • 69 Beispiel der Houghtransformation
  • 70 Beispiel der Houghtransformation
  • 71 Zirkul¨are Houghtransformation
  • 72 Konzept von optimalen Thresholding
  • 73 Beispiel f¨ur optimales Thresholding: Histogramm
  • 74 Beispiel f¨ur optimales Thresholding: Ergebnis
  • 75 Kanteneigenschaften
  • 76 Graphen Repr¨asentierung eines Kantenbildes
    • von H bestimmt Pfad mit geringsten Kosten Pfade nach D,E,F (e) optimale Pfade nach G,H,I (f) Backtracking
  • 78 splitting/merging
  • 79 Binary neighborhood encoding
  • 80 Morphological image processing
  • 81 Erosion and dilation
  • 82 Opening and closing (auch in der Figure !)
  • 83 Thinning
  • 84 Skeletonization
  • 85 Grundprinzipien: Wasserscheiden und Auffangbecken
  • 86 Einflusszonen der Auffangbecken
  • 87 Original, Grandientenbild, Watersheds, original mit Watersheds
  • 88 Ubersegmentierung .¨
  • 89 Watersheds mit inneren und ¨ausseren Markern
  • 90 Beispiel: alle Varianten
  • 91 Dammkonstruktion mit Dilation

1 Introduction

1.1 Literature on Image Processing

There are many books about the subject so here are some examples...

  • Fundamentals of Digital Image Processing, Anil K. Jain
  • Fundamentals of Electronic Image Processing, Arthur R. Weeks Jr.
  • Digital Image Processing, Rafael C. Gonzalez, Richard E. Woods
  • Image Processing, Analysis, and Machine Vision, Milan Sonka, Vaclav Hlavac, Roger Boyle

The most important Journals for publication on the subject are...

  • IEEE Transactions on Image Processing (TIP)
  • IEEE Transactions on Circuits and Systems for Video Technology
  • SPIE Journal of Electronic Imaging
  • Image and Vision Computing
  • Signal Processing: Image Communication
  • International Journal on Imaging and Graphics
  • IEEE Transactions on Medical Imaging^1

Three of the most important conferences on image processing...

  • IEEE International Conference on Image Processing (ICIP)
  • IEEE International Conference on Accustic, Speech and Signal Processing (ICASSP)
  • SPIE Symposium on Electronic Imaging

1.2 Overview

1.2.1 Digital Image Processing

  • Vision allows humans to perceive and understand the world surrounding us.
  • Computer vision aims to duplicate the effect of human vision by electron- ically perceiving and understanding an image. (^1) image processing 6 = imaging!
  • or higher-dimensional

A scalar function may be sufficient to describe a monochromatic image, while vector functions are to represent, for example, color images consisting of three component colors.

Figure 1: source image

Instead of an signal function a two-dimensional image matrix is used. Each element of the image matrix represents one pixel (picture element) with its position uniquely identified by the row- and column-index. The value of the matrix element represents the brightness value of the corresponding pixel within a discrete range.

Figure 2: image as 2D-set of brightness values

Figure 3: source image

1.3.1 Color Representation

In the RGB color modell (see figure 4) the luminance value is encoded in each color channel while in the YUV color modell (see figure 5) the luminance is only encoded in the Y channel.

Y ≈ 0 .5Green + 0.3Red + 0.2Blue

red channel green channel blue channel Figure 4: RGB decomposition of figure 3

luminance channel (Y) red-green balance (U=B-Y) yellow-blue balance (V=R-Y) Figure 5: YUV decomposition of figure 3

Y + U = Y + (B − Y ) = Y − Y + B = B

Y + V = Y + (R − Y ) = Y − Y + R = R

Y − B − R = (R + G + B) − B − R = G

Palette Images (i.e. “Malen nach Zahlen”) include a lookuptable where an index identifies a certain color in unique way. Pixels do not carry luminance or

chessboard distance D 8 ((i, j), (h, k)) = max{|i − h|, |j − k|}

Pixel adjacency is another important concept in digital images. You can either have a 4-neighborhood or a 8-neighborhood as depicted in figure 8.

Figure 8: pixel neighborhoods

It will become necessary to consider important sets consisting of several adjacent pixels. So we define a regions as a contiguous set (of adjacent pixels). There exist various contiguity paradoxes of the square grid as shown in fig- ure 9.

digital line closed curve paradox Figure 9: contiguity paradoxes

One possible solution to contiguity paradoxes is to treat objects using 4-neighborhood and background using 8-neighborhood (or vice versa). A hexagonal grid (as de- picted in figure 10) solves many problems of the square grids. Any point in the hexagonal raster has the same distance to all its six neighbors.

square grid hexagonal grid Figure 10: grid types

Border R is the set of pixels within the region that have one or more neighbors outside R. We distinguish between inner and outer borders. An edge is a local property of a pixel and its immediate neighborhood – it is a vector given by a magnitude and direction. The edge direction is perpendicular to the gradient direction which points in the direction of image function growth.

Four crack edges are attached to each pixel, which are defined by its relation to its 4-neighbors as depicted in figure 11. The direction of the crack edge is that of increasing brightness, and is a multiple of 90 degrees, while its magnitude is the absolute difference between the brightness of the relevant pair of pixels.

pixel crack edge

Figure 11: crack edges

The border is a global concept related to a region, while edge expresses local properties of an image function.

1.3.4 Histograms

Figure 12: image histogram for figure 3

Brightness histogram provides the frequency of the brightness value z in an image. Figure 12 shows the brightness histogram of the image in figure 3. Histograms lack the positional aspect as depicted in figure 13.

Figure 13: images with same histogram

1.4 Image Representation

iconic images consists of images containing original data; integer matrices with data about pixel brightness. E.g., outputs of pre-processing operations (e.g., filtration or edge sharpen- ing) used for highlighting some aspects of the image important for further treatment.

0

3 2 1 4 5 6 7

Figure 14: chain data structure

If local information is needed from the chain code, it is necessary to search through the whole chain systematically.

  • Does the border turn somewhere to the left by 90 degrees?
  • A sample pair of symbols in the chain must be found - simple.

If global information is needed, the situation is much more difficult. For example questions about the shape of the border represented by chain codes are not trivial. Chains can be represented using static data structures (e.g., one-dimensional arrays). Their size is the longest length of the chain expected. Dynamic data structures are more advantageous to save memory.

1.5.3 Run length coding

not covered here.

1.5.4 Topological Data Structures

Topological data structures describe images as a set of elements and their relations. This can be expressed in graphs (evaluated graphs, region adjacency graphs). For a region adjacency graph as an example of a topological data structure see figure 15.

0 1 2

4 3 5

0 (^1 ) 3 4 5

Figure 15: region adjacency graph

1.5.5 Relational Structures

Information is concentrated in relations between semantically important parts of the image: objects, that are the result of segmentation. For an example see figure 16. This type of data structure is especially appropriate for higher level image un- derstanding.

4 5

(^12)

3

50 100 150 200 250

50 100 150 200 250 300 350 400 450 no. object name colour min. row min. col. inside 1 sun yellow 30 30 2 2 sky blue 0 0 – 3 ball orange 210 80 4 4 hill green 140 0 – 5 lake blue 225 275 4 Figure 16: relational data structure

1.6 Hierarchical Data Structures

Computer vision is by its nature very computationally expensive, if for no other reason than the amount of data to be processed. One of the solutions is using parallel computers (brute force). Many computer vision problems are difficult to divide among processors, or decompose in any way. Hierarchical data structures make it possible to use algorithms which decide a strategy for processing on the basis of relatively small quantities of data. They work at the finest resolution only with those parts of the image for which it is necessary, using knowledge instead of brute force to ease and speed up the processing. Two typical structures are pyramids and quadtrees. Problems associated with hierarchical image representation are:

  • Dependence on the position, orientation and relative size of objects.
  • Two similar images with just very small differences can have very different pyramid or quadtree representations.
  • Even two images depicting the same, slightly shifted scene, can have en- tirely different representations.

Level 0

Level 1

Level 2

Figure 18: T-pyramid data structure

0

10 11

13 120 121 122 123

2 3

0 2 3

10 11 13

120 121 122 123

Figure 19: quadtree

1.7 Perception

Die menschliche Wahrnehmung entspricht dem Human Visual System (HVS).

Definition 1 (Kontrast) entspricht der lokale Ver¨anderung der Helligkeit, definiert als Quotient zwischen dem Durchschnitt der Objekthelligkeit und der Hinter- grundhelligkeit.

Der Kontrast ist eine logarithmische Eigenschaft (d.h.: keine Ubereinstimmung¨ von Numerik und Wahrnehmung; bei h¨oherer Helligkeit braucht man f¨ur gle- ichen Eindruck h¨oheren Kontrast). Die Sehsch¨arfe (acuity) ist am besten gegen¨uber mittleren Wechseln in der Helligkeit; weniger gut bei zu schnellen oder zu langsamen Wechseln und inter- subjektiv verschieden → “Multiresolution Wahrnehmung”

2 Image Enhancement

Ziel des Image Enhancements ist es, Bilder vorzuverarbeiten, damit sie f¨ur spezielle Applikationen besser geeignet sind. Man unterscheidet dabei zwischen:

  • spatial domain methods (Bildraum)
  • transform domain (e.g., Frequenzraum-Fourier, Orts/Frequenzraum-Wavelets)

2.1 Spatial Domain Methoden

Es sei f (x, y) die Bildfunktion des Ausgangsbilds und g(x, y) = T (f (x, y)) das verbesserte Bild. T steht f¨ur eine Operation auf f (x, y) in einer Nachbarschaft^2 von (x, y). Einfachster Fall: 1 × 1 Nachbarschaft, d.h. g h¨angt nur vom Wert von f an der Stelle (x, y) ab. T heisst dann Grauwerttransformation (siehe figure 20) mit der Form s = T (v) mit v = f (x, y) und s = g(x, y)

dark light

dark

light

hervorgehobener Bereich Transferfunktion (mehr Kontrast)

dark light

dark

light

Transformation^ binäre

Figure 20: Grauwerttransformation

In der Graphik bezeichnet die x-Achse die urspr¨unglichen Werte, die y-Achse die Werte nach der Transformation. Gr¨oßere Nachbarschaft: verschiedene Verarbeitungsfunktionen werden oft als Masken (Templates, Windows, Filter) bezeichnet. Ein kleines Array (e.g. 3× 3 Pixel) wird ¨uber das Bild bewegt. Koeffizienten des Arrays sind so gew¨ahlt, dass gewisse Bildeigenschaften hervorgehoben werden. Beispiel: Bild konstanter Intensit¨at, mit isolierten Punkten anderer Intensit¨at (“Pop Noise”); Maske: wi = − 1 i = 1,... 9 ausser w 5 = 8, jedes Feld wird mit darunterliegenden Pixeln multipliziert und die Ergebnisse addiert. Wenn alle Pixel gleich sind ist das Ergebnis 0. Die Maske wird Pixel f¨ur Pixel ¨uber das Bild geschoben (siehe figure 21).

Ergebnis

= 0 alle Pixel identisch

0 Mittelpixel hat h¨oheren Wert < 0 Mittelpixel hat geringeren Wert

T [f (x, y)] = w 1 f (x− 1 , y−1)+w 2 f (x− 1 , y)+w 3 f (x− 1 , y+1)+.. .+w 9 f (x+1, y+1) (^2) i.A. eine quadratische Bildregion mit Zentrum in (x, y). Das Zentrum wird von Pixel zu Pixel bewegt.