Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that...
-
Upload
samuel-elliott -
Category
Documents
-
view
215 -
download
0
Transcript of Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that...
![Page 1: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/1.jpg)
Image GeometryDigital Image Processing
![Page 2: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/2.jpg)
2
Interpolation of DataSuppose we have a collection of four values that we
wish to enlarge to eight:
Interpolated results x-axis => y-axis
Note that none of both counterparts exactly coincide, except for the first and last. Therefore, an estimation (i.e., interpolation) function is needed for all mapped values.
or
![Page 3: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/3.jpg)
3
Interpolation of Data
• The a and b of the linear function can be solved by
• Then we can obtain the linear function
![Page 4: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/4.jpg)
4
Popular Linear Interpolation Methods
Nearest-neighbor interpolation Linear interpolation
![Page 5: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/5.jpg)
5
Calculation of Linear Interpolation
Ch6-p.124
f(x1), F, f(x2) are co-linear
![Page 6: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/6.jpg)
6
Image InterpolationConsider a 4x4
image is enlarged to an 8x8 image
Only the corner pixels are aligned
Interplation is needed
![Page 7: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/7.jpg)
7
Bilinear Interpolation
![Page 8: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/8.jpg)
8
Image Resize – imresize()• Function imresize
• Where A is an image of any type, k is a scaling factor, and ’method’ is either ’nearest’ or ’bilinear’, etc.
Ch6-p.127
![Page 9: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/9.jpg)
9
General Interpolation
Ch6-p.129
![Page 10: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/10.jpg)
10
Cubic Interpolation
![Page 11: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/11.jpg)
11
Bi-cubic Interpolation
Ch6-p.131
![Page 12: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/12.jpg)
12
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 filteringWe may expand the image size and fill the interleaved
rows and columns with 0s. e.g.
Replace the interleaved 0s with interpolated values by either nearest-neighbor, bilinear, bi-cubic interpolation methods.
Ch6-p.132
![Page 13: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/13.jpg)
Enlargement Example (1/4)Create a 4x4 matrix (later expanded to 8x8)
The 8x8 zero-interleaved matrix can be obtained by:
13
![Page 14: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/14.jpg)
14
Enlargement Example (2/4)The enlarged 8x8 matrix
The interpolation methods could be either
nearest-neighbor bilinear bicubic
Ch6-p.133
![Page 15: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/15.jpg)
15
Enlargement Example (3/4)Nearest-neighbor
Bilinear
Ch6-p.134
![Page 16: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/16.jpg)
16
Enlargement Example (4/4)Bi-cubic
![Page 17: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/17.jpg)
17
Scaling Smaller• Making an image smaller is also called image
minimization• Subsampling example
Nearest-neighbor minimization
Bi-cubic interpolation for minimization
Drawing a circle (points away from (512,512) approximately 256 pixels are considered on the circle)
Default: nearest neighbor
Bi-cubic minimization
![Page 18: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/18.jpg)
18
Rotation
• The filled circles indicate the original position, and the open circles point their positions after rotation• Issues:• Ensure points are on the grid after rotation• Points in the rotated image need to be
interpolated
![Page 19: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/19.jpg)
19
Rotate with nearest-neighbor interpolation
Rotate with bi-cubic interpolation
![Page 20: Digital Image Processing. 2 Interpolation of Data Suppose we have a collection of four values that we wish to enlarge to eight: Interpolated results x-axis.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d095503460f949db017/html5/thumbnails/20.jpg)
20
Anamorphosis – morphing
The Ambassadors (1533) by Hans Holbein