Digital Image Processing
Homework 2, Due 2019/4/2
Problem 1
Zooming and Shrinking Images by Bilinear Interpolation
(a) Write a computer program capable of zooming and shrinking an image by
bilinear interpolation. The input to your program is the desired size of the resulting
image in the horizontal and vertical direction. You may ignore aliasing effects.
(b) Download Fig. 2.19(a) and use your program to shrink this image from 1024 x
1024 to 256 x 256 pixels.
(c) Use your program to zoom the image in (b) back to 1024 x 1024. Explain the
reasons for their differences.
Problem 2
Difference of Two Images
(Page 88) Write a computer program to set to zero the least significant bit of every pixel in an image, subtract this image from the original image, and then scale the difference image to the range [0, 255].
Fig0230(a)(washington_infrared).bmp
Problem 3
Rotate an image
Write a computer program to obtain an image rotated -21 degrees using nearest neighbor interpolation
to assign intensity values to the spatiaaly transformed pixels. (Page 104)
Upload your homework to e起來-高大教學平台 .