Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 Digital Image Processing

2 2 Interpolation of Data Suppose 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

3 3 Interpolation of Data The a and b of the linear function can be solved by Then we can obtain the linear function

4 4 Popular Linear Interpolation Methods Nearest-neighbor interpolationLinear interpolation

5 5 Calculation of Linear Interpolation Ch6-p.124 f(x1), F, f(x2) are co-linear

6 6 Image Interpolation Consider a 4x4 image is enlarged to an 8x8 image Only the corner pixels are aligned Interplation is needed

7 7 Bilinear Interpolation

8 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

9 9 General Interpolation Ch6-p.129

10 10 Cubic Interpolation

11 11 Bi-cubic Interpolation Ch6-p.131

12 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 filtering We 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

13 Enlargement Example (1/4) Create a 4x4 matrix (later expanded to 8x8) The 8x8 zero-interleaved matrix can be obtained by: 13

14 14 Enlargement Example (2/4) The enlarged 8x8 matrix The interpolation methods could be either nearest-neighbor bilinearbicubic Ch6-p.133

15 15 Enlargement Example (3/4) Nearest-neighbor Bilinear Ch6-p.134

16 16 Enlargement Example (4/4) Bi-cubic

17 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

18 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

19 19 Rotate with nearest-neighbor interpolation Rotate with bi-cubic interpolation

20 20 Anamorphosis – morphing The Ambassadors (1533) by Hans Holbein


Download ppt "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."

Similar presentations


Ads by Google