Digital Image Processing Unit 1 NotesPPT

DrBalajiGanesh 38 views 123 slides Oct 19, 2024
Slide 1
Slide 1 of 123
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46
Slide 47
47
Slide 48
48
Slide 49
49
Slide 50
50
Slide 51
51
Slide 52
52
Slide 53
53
Slide 54
54
Slide 55
55
Slide 56
56
Slide 57
57
Slide 58
58
Slide 59
59
Slide 60
60
Slide 61
61
Slide 62
62
Slide 63
63
Slide 64
64
Slide 65
65
Slide 66
66
Slide 67
67
Slide 68
68
Slide 69
69
Slide 70
70
Slide 71
71
Slide 72
72
Slide 73
73
Slide 74
74
Slide 75
75
Slide 76
76
Slide 77
77
Slide 78
78
Slide 79
79
Slide 80
80
Slide 81
81
Slide 82
82
Slide 83
83
Slide 84
84
Slide 85
85
Slide 86
86
Slide 87
87
Slide 88
88
Slide 89
89
Slide 90
90
Slide 91
91
Slide 92
92
Slide 93
93
Slide 94
94
Slide 95
95
Slide 96
96
Slide 97
97
Slide 98
98
Slide 99
99
Slide 100
100
Slide 101
101
Slide 102
102
Slide 103
103
Slide 104
104
Slide 105
105
Slide 106
106
Slide 107
107
Slide 108
108
Slide 109
109
Slide 110
110
Slide 111
111
Slide 112
112
Slide 113
113
Slide 114
114
Slide 115
115
Slide 116
116
Slide 117
117
Slide 118
118
Slide 119
119
Slide 120
120
Slide 121
121
Slide 122
122
Slide 123
123

About This Presentation

Image Processing notes


Slide Content

Introduction to Digital Image Processing [email protected] Dr.S.Deepa Assistant Professor SRM Institute of Science and Technology

Outline Definition Image Sampling and Quantization Types of Digital Images Stages in Digital Image processing Applications 2

Digital Image A digital image is a representation of a two-dimensional image as a finite set of digital values, called picture elements or pixels. Pixel values typically represent gray levels, colours , heights, opacities etc. Digitization implies that a digital image is an approximation of a real scene. Common image formats include black and white images, grayscale images and RGB images. 3

Digital Image Processing Digital Image Processing means processing digital image by means of a digital computer. It uses computer algorithms, in order to get enhanced image to extract some useful information. 4

5 Image Acquisition Process

6 Introduction What is Digital Image Processing? Digital Image — a two-dimensional function x and y are spatial coordinates The amplitude of f is called intensity or gray level at the point (x, y) Digital Image Processing — process digital images by means of computer, it covers low-, mid-, and high-level processes low-level: inputs and outputs are images mid-level: outputs are attributes extracted from input images high-level: an ensemble of recognition of individual objects Pixel — the elements of a digital image

7 A Simple Image Formation Model

8 Some Typical Ranges of Reflectance Reflectance 0.01 for black velvet 0.65 for stainless steel 0.80 for flat-white wall paint 0.90 for silver-plated metal 0.93 for snow

9 Image Sampling and Quantization The sampling rate determines the spatial resolution of the digitized image, while the quantization level determines the number of grey levels in the digitized image. Hence in order to create an image which is digital, we need to covert continuous data into digital form. There are two steps in which it is done: Sampling Quantization

Image Sampling and Quantization 10 Digitizing the coordinate values Digitizing the amplitude values

11 Image Sampling and Quantization

12 Representing Digital Images The representation of an M ×N numerical array as

13 Representing Digital Images The representation of an M ×N numerical array as

14 Representing Digital Images The representation of an M ×N numerical array in MATLAB

Types of Digital Images Intensity image or monochrome image:  Each pixel corresponds to light intensity normally represented in gray scale. Color image or RGB image:  Each pixel contains a vector representing red, green and blue components. Binary image or black and white image:  Each pixel contains one bit, 1 represents white and 0 represents black. 15

Image Resolution Resolution refers to the number of pixels in an image. The amount of resolution required depends on the amount of details we are interested in. We will now take a look at Image and Intensity Resolution of a digital image. Spatial resolution:  It is a measure of the smallest discernible detail in an image. Vision specialists state it with dots (pixels) per unit distance, graphic designers state it with dots per inch (dpi). Intensity Level Resolution:  It refers to the number of intensity levels used to represent the image. The more intensity levels used, the finer the level of detail discernable in an image. Intensity level resolution is usually given in terms of the number of bits used to store each intensity level. 16

17

18

19 Representing Digital Images Discrete intensity interval [0, L-1], L=2 k The number b of bits required to store a M × N digitized image b = M × N × k

20

21

22

Key Stages in Digital Image Processing Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression 23

Key Stages in Digital Image Processing: Image Aquisition Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression 24

25

Key Stages in Digital Image Processing: Image Enhancement Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Images taken from Gonzalez & Woods, Digital Image Processing (2002) 26

27

Image enhancement  is the procedure of improving the quality and information content of original data before processing. For example, you can remove noise, sharpen, or brighten an image, making it easier to  identify key features . 28

Here are some useful examples and methods of image enhancement: Filtering with morphological operators Histogram equalization Noise removal using a Wiener filter Linear contrast adjustment Median filtering Unsharp mask filtering Contrast-limited adaptive histogram equalization (CLAHE) Decorrelation stretch 29

Correcting nonuniform illumination  with morphological operators. 30 Enhancing grayscale images with  histogram equalization .

Key Stages in Digital Image Processing: Image Restoration Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Images taken from Gonzalez & Woods, Digital Image Processing (2002) 31

Image Restoration To restore extremely blurred or degraded image. Images blurred due to many factors like relative motion between camera and a moving car ( eg . Image of a speeding car). Inverse filter, Wiener filter & Lucy-Richardson filters are used to restore images. 32

33

Key Stages in Digital Image Processing: Morphological Processing Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Images taken from Gonzalez & Woods, Digital Image Processing (2002) 34

Morphology  is a broad set of image processing operations that process images based on shapes. Morphological operations apply a structuring element to an input image, creating an output image of the same size.  The most basic morphological operations are dilation and erosion . Dilation adds pixels to the boundaries of objects in an image, while erosion removes pixels on object boundaries.  35

Dilation 36 Erosion

37

Key Stages in Digital Image Processing: Segmentation Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Images taken from Gonzalez & Woods, Digital Image Processing (2002) 38

39

Types of Segmentation Thresholding   Segmentation . Edge-Based  Segmentation . Region-Based  Segmentation . Watershed  Segmentation . Clustering-Based  Segmentation  Algorithms. Neural Networks for  Segmentation . https://www.mathworks.com/discovery/image-segmentation.html 40

Key Stages in Digital Image Processing: Object Recognition Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Images taken from Gonzalez & Woods, Digital Image Processing (2002) 41

42

https://www.mathworks.com/solutions/image-video-processing/object-recognition.html 43

Key Stages in Digital Image Processing: Representation & Description Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression Images taken from Gonzalez & Woods, Digital Image Processing (2002) 44

45

46

Key Stages in Digital Image Processing: Image Compression Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression 47

48

Key Stages in Digital Image Processing: Colour Image Processing Image Acquisition Image Restoration Morphological Processing Segmentation Representation & Description Image Enhancement Object Recognition Problem Domain Colour Image Processing Image Compression 49

50

51

52

53

54

55

Applications & Research Topics 56

Document Handling 57

Signature Verification 58

Biometrics 59

Fingerprint Verification / Identification 60

Object Recognition 61

Object Recognition Research reference view 1 reference view 2 novel view recognized 62

Indexing into Databases Shape content 63

Indexing into Databases (cont’d) Color, texture 64

Target Recognition Department of Defense (Army, Airforce, Navy) 65

Interpretation of aerial photography is a problem domain in both computer vision and registration. Interpretation of Aerial Photography 66

Autonomous Vehicles Land, Underwater, Space 67

Traffic Monitoring 68

Face Detection 69

Face Recognition 70

Facial Expression Recognition 71

Hand Gesture Recognition Smart Human-Computer User Interfaces Sign Language Recognition 72

Human Activity Recognition 73

Medical Applications skin cancer breast cancer 74

Morphing 75

Inserting Artificial Objects into a Scene 76

Companies In this Field In India Sarnoff Corporation Kritikal Solutions National Instruments GE Laboratories Ittiam , Bangalore Interra Systems, Noida Yahoo India (Multimedia Searching) nVidia Graphics, Pune (have high requirements) Microsoft research DRDO labs ISRO labs … 77

78

Neighborhood Operations in Images 79

80 Basic Relationships Between Pixels Neighborhood Adjacency Connectivity Paths Regions and boundaries

81 Basic Relationships Between Pixels Neighbors of a pixel p at coordinates (x,y) 4-neighbors of p , denoted by N 4 (p) : (x-1, y), (x+1, y), (x,y-1), and (x, y+1). 4 diagonal neighbors of p , denoted by N D (p) : (x-1, y-1), (x+1, y+1), (x+1,y-1), and (x-1, y+1). 8 neighbors of p , denoted N 8 (p) N 8 (p) = N 4 (p) U N D (p)

82 Basic Relationships Between Pixels Adjacency Let V be the set of intensity values 4-adjacency : Two pixels p and q with values from V are 4-adjacent if q is in the set N 4 (p). 8-adjacency : Two pixels p and q with values from V are 8-adjacent if q is in the set N 8 (p).

83 Basic Relationships Between Pixels Adjacency Let V be the set of intensity values m-adjacency : Two pixels p and q with values from V are m-adjacent if ( i ) q is in the set N 4 (p), or (ii) q is in the set N D (p) and the set N 4 (p) ∩ N 4 (p) has no pixels whose values are from V.

84 Basic Relationships Between Pixels Path A (digital) path (or curve) from pixel p with coordinates (x , y ) to pixel q with coordinates ( x n , y n ) is a sequence of distinct pixels with coordinates (x , y ), (x 1 , y 1 ), …, ( x n , y n ) Where (x i , y i ) and (x i-1 , y i-1 ) are adjacent for 1 ≤ i ≤ n. Here n is the length of the path. If (x , y ) = ( x n , y n ), the path is closed path. We can define 4-, 8-, and m-paths based on the type of adjacency used.

85 Examples: Adjacency and Path 0 1 1 0 1 1 0 1 1 0 2 0 0 2 0 0 2 0 0 0 1 0 0 1 0 0 1 V = {1, 2}

86 Examples: Adjacency and Path 0 1 1 0 1 1 0 1 1 0 2 0 0 2 0 0 2 0 0 0 1 0 0 1 0 0 1 V = {1, 2} 8-adjacent

87 Examples: Adjacency and Path 0 1 1 0 1 1 0 1 1 0 2 0 0 2 0 0 2 0 0 0 1 0 0 1 0 0 1 V = {1, 2} 8-adjacent m-adjacent

88 Examples: Adjacency and Path 1,1 1 1,2 1 1,3 0 1 1 0 1 1 2,1 2 2,2 2,3 0 2 0 0 2 0 3,1 3,2 1 3,3 0 0 1 0 0 1 V = {1, 2} 8-adjacent m-adjacent The 8-path from (1,3) to (3,3): (1,3), (1,2), (2,2), (3,3) (1,3), (2,2), (3,3) The m-path from (1,3) to (3,3): (1,3), (1,2), (2,2), (3,3)

89 Basic Relationships Between Pixels Connected in S Let S represent a subset of pixels in an image. Two pixels p with coordinates (x , y ) and q with coordinates (x n , y n ) are said to be connected in S if there exists a path (x , y ), (x 1 , y 1 ), …, (x n , y n ) Where

90 Basic Relationships Between Pixels Let S represent a subset of pixels in an image For every pixel p in S, the set of pixels in S that are connected to p is called a connected component of S. If S has only one connected component, then S is called Connected Set . We call R a region of the image if R is a connected set Two regions, R i and R j are said to be adjacent if their union forms a connected set. Regions that are not to be adjacent are said to be disjoint.

91 Basic Relationships Between Pixels Boundary (or border) The boundary of the region R is the set of pixels in the region that have one or more neighbors that are not in R. If R happens to be an entire image, then its boundary is defined as the set of pixels in the first and last rows and columns of the image. Foreground and background An image contains K disjoint regions, R k , k = 1, 2, …, K. Let R u denote the union of all the K regions, and let (R u ) c denote its complement. All the points in R u is called foreground ; All the points in (R u ) c is called background .

92 Distance Measures Given pixels p, q and z with coordinates (x, y), (s, t), (u, v) respectively, the distance function D has following properties: D(p, q) ≥ 0 [D(p, q) = 0, iff p = q] D(p, q) = D(q, p) D(p, z) ≤ D(p, q) + D(q, z)

93 Distance Measures The following are the different Distance measures: a. Euclidean Distance : D e (p, q) = [(x-s) 2 + (y-t) 2 ] 1/2 b. City Block Distance: D 4 (p, q) = |x-s| + |y-t| c. Chess Board Distance: D 8 (p, q) = max(|x-s|, |y-t|)

94 Introduction to Mathematical Operations in DIP Array vs. Matrix Operation Array product Matrix product Array product operator Matrix product operator

95 Arithmetic Operations Arithmetic operations between images are array operations. The four arithmetic operations are denoted as s(x,y) = f(x,y) + g(x,y) d(x,y) = f(x,y) – g(x,y) p(x,y) = f(x,y) × g(x,y) v(x,y) = f(x,y) ÷ g(x,y)

96 Example: Addition of Noisy Images for Noise Reduction Noiseless image: f(x,y) Noise: n(x,y) (at every pair of coordinates (x,y), the noise is uncorrelated and has zero average value) Corrupted image: g(x,y) g(x,y) = f(x,y) + n(x,y) Reducing the noise by adding a set of noisy images, {g i (x,y)}

97

98 An Example of Image Subtraction: Mask Mode Radiography Mask h(x,y): an X-ray image of a region of a patient’s body Live images f(x,y): X-ray images captured at TV rates after injection of the contrast medium Enhanced detail g(x,y) g(x,y) = f(x,y) - h(x,y) The procedure gives a movie showing how the contrast medium propagates through the various arteries in the area being observed.

99

100 An Example of Image Multiplication

101 Set and Logical Operations

102 Set and Logical Operations Let A be the elements of a gray-scale image The elements of A are triplets of the form (x, y, z), where x and y are spatial coordinates and z denotes the intensity at the point (x, y). The complement of A is denoted A c

103 Set and Logical Operations The union of two gray-scale images (sets) A and B is defined as the set

104 Set and Logical Operations

105 Set and Logical Operations

106 Spatial Operations Single-pixel operations Alter the values of an image’s pixels based on the intensity. e.g.,

107 Spatial Operations Neighborhood operations The value of this pixel is determined by a specified operation involving the pixels in the input image with coordinates in S xy

108 Spatial Operations Neighborhood operations

109 Geometric Spatial Transformations Geometric transformation (rubber-sheet transformation) — A spatial transformation of coordinates — intensity interpolation that assigns intensity values to the spatially transformed pixels. Affine transform

110

111 Image Registration Input and output images are available but the transformation function is unknown. Goal: estimate the transformation function and use it to register the two images. One of the principal approaches for image registration is to use tie points (also called control points ) The corresponding points are known precisely in the input and output ( reference ) images.

112 Image Registration A simple model based on bilinear approximation:

113 Image Registration

114 Image Transform A particularly important class of 2-D linear transforms, denoted T(u, v)

115 Image Transform Given T(u, v), the original image f(x, y) can be recoverd using the inverse tranformation of T(u, v).

116 Image Transform

117 Example: Image Denoising by Using DCT Transform

118 Forward Transform Kernel

119 The Kernels for 2-D Fourier Transform

120 2-D Fourier Transform

121 Probabilistic Methods

122 Probabilistic Methods

123 Example: Comparison of Standard Deviation Values
Tags