1. Refer to figure 1. A CCD camera chip
of dimensions 7 × 7 mm, and having 1024
× 1024 elements is focused on a square,
flat area, located 0.5 m away. How many
line pairs per mm will this camera be able
to resolve? The camera is equipped with
a 35-mm lens.
2. Download the image processing tutorial
(the user’s guide) from Mathworks
sk/help/toolbox/images/), read the tutorial
and make practice according to the
tutorials. (If the website is not accessible, 5 practices from the tutorial are given as PDF files).
3. Use nearest neighbor interpolation and bilinear interpolation to interpolate a grey scale image.
Implement the interpolation as a function with the form:
InterpolationBilinear(input_file, dim), or InterpolationNearest(input_file, dim)
where input_file is the file name that to be interpolated, and dim is a 1 × 2 vector specifying the row
and column numbers of the interpolated image. The dimension of the interpolated image may be
larger or smaller than that of the original image.
Submit your code (with comments to explain how the interpolation is realized) and two interpolated
images from a given image ‘rice.tif’:
1. with dimension (256 * 1.x) × (256 * 1.x), where x is the last digit of your matriculation number; if
the last digit of matriculation number is 0, set x to be 45. Round 256 * 1.x to the nearest integer.
2. with dimension (256 * 0.x) × (256 * 0.x), or (256 * (1− 0.x)) × (256 * (1− 0.x)), whichever is larger,
where x is the same as the above. Round the dimension also to the nearest integer.
Send your answers and codes to
firstname.lastname@example.org 助教马定妃 with the following formats.
Email subject: DIP assignment & lab 1
Naming rules for files to be submitted:
Answers_学号.doc or .pdf: The answer of Question 1, and any necessary explanations of your
Nearest_学号.m: The matlab code of the nearest interpolation with comments.
Bilinear_学号.m: The matlab code of the bilinear interpolation with comments.
Enlarged_学号.tif: The interpolated image file with an interpolation factor of 1.x
Shrinked_学号.tif: The interpolated image file with an interpolation factor of 0.x