Download presentation
Presentation is loading. Please wait.
Published byTeguh Pranoto Modified over 5 years ago
1
© 2010 Cengage Learning Engineering. All Rights Reserved.
Introduction to Digital Image Processing with MATLAB® Asia Edition McAndrew‧Wang‧Tseng Chapter 6: Image Geometry © 2010 Cengage Learning Engineering. All Rights Reserved.
2
© 2010 Cengage Learning Engineering. All Rights Reserved.
6.1 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p
3
© 2010 Cengage Learning Engineering. All Rights Reserved.
6.1 Interpolation of Data x x' © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.122
4
© 2010 Cengage Learning Engineering. All Rights Reserved.
6.1 Interpolation of Data The a and b of the linear function can be solved by Then we can obtain the linear function (continuous) © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.122
5
© 2010 Cengage Learning Engineering. All Rights Reserved.
6.1 Interpolation of Data In digital (discrete), none of the points coincide exactly with an original xj, except for the first and last We have to estimate function values based on the known values of nearby f (xj) Such estimation of function values based on surrounding values is called interpolation © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p
6
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.4 Nearest-neighbor interpolation © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.123
7
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.5 Linear interpolation © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.123
8
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.6 (Equation 6.1) © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.124
9
© 2010 Cengage Learning Engineering. All Rights Reserved.
6.2 Image Interpolation Using the formula given by Equation 6.1 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.125
10
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.7 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.125
11
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.8 bilinear interpolation © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.126
12
© 2010 Cengage Learning Engineering. All Rights Reserved.
6.2 Image Interpolation Function imresize Where A is an image of any type, k is a scaling factor, and ’method’ is either ’nearest’ or ’bilinear’, etc. © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.127
13
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.9 & 6.10 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p
14
6.3 General Interpolation
(Equation 6.2) © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.129
15
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.12 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.129
16
6.3 General Interpolation
The functions R0(u) and R1(u) are just two members of a family of possible interpolation functions Another such function provides cubic interpolation © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.130
17
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.14 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.131
18
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.15 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.131
19
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.16 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p
20
6.4 Enlargement by Spatial Filtering
If we merely wish to enlarge an image by a power of two, there is a quick and dirty method that uses linear filtering e.g. zero-interleaved © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.132
21
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.17 This can be implemented with a simple function © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.133
22
6.4 Enlargement by Spatial Filtering
We can now replace the zeros by applying a spatial filter to this matrix nearest-neighbor bilinear bicubic © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.133
23
6.4 Enlargement by Spatial Filtering
© 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.134
24
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.18 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p
25
© 2010 Cengage Learning Engineering. All Rights Reserved.
6.5 Scaling Smaller Making an image smaller is also called image minimization Subsampling e.g. © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.135
26
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.19 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.136
27
© 2010 Cengage Learning Engineering. All Rights Reserved.
6.6 Rotation © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.136
28
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.21 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.138
29
© 2010 Cengage Learning Engineering. All Rights Reserved.
6.6 Rotation In Figure 6.21, the filled circles indicate the original position, and the open circles point their positions after rotation We must ensure that even after rotation, the points remain in that grid To do this we consider a rectangle that includes the rotated image, as shown in Figure 6.22 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.137
30
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.22 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.138
31
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.23 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.138
32
© 2010 Cengage Learning Engineering. All Rights Reserved.
6.6 Rotation The gray value at (x”, y”) can be found by interpolation, using surrounding gray values. This value is then the gray value for the pixel at (x’, y’) in the rotated image © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.137
33
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.24 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.139
34
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.25 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.139
35
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.26 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.140
36
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.27 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.141
37
© 2010 Cengage Learning Engineering. All Rights Reserved.
FIGURE 6.28 © 2010 Cengage Learning Engineering. All Rights Reserved. Ch6-p.142
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.