Description
1. Write a MATLAB program to change (downsample) the spatial resolution to 256×256, 128×128, and 32×32
pixels. Save these three images as 512×512 images. To do this, you will replicate pixels (upsample) to reach
the desired size; i.e., perform nearest-neighbor interpolation. (Do not change the gray-scale resolution.)
Note that you must write MATLAB code that explicitly scans through the 2D array of an image in the x
and y directions, per the example main.m file.
WARNING: It is forbidden to use MATLAB functions that perform complete 2D array processing in one command during our course!
2. Create an interpolated 512 × 512 image from your 32 × 32 image of part 1 (before you upsampled it to
512 × 512!) using either bilinear, bicubic, or inverse-distance interpolation, as discussed in G&W Sect. 2.4
and the Project Material document “Proj1-Interpolation.pdf.”
3. Write a program to change the gray-level quantization of the original 512×512 image by reducing the number
of bits per pixel from 8 to 7, 6, 5, 4, 3, 2 and 1 bits/pixel. Save these 7 new images. Be sure that the gray
levels used in the new images span the 8-bit range! For example, for the new 6 bits/pixel image, the image
pixels should use the 64 gray levels 0, 4, 8, 12, . . . 252.
4. Make a 512×512 image that: (i) changes the spatial resolution to 256 × 256 pixels and (ii) gray-scale resolution to 6 bits/pixel. Does this image depict any obvious artifacts relative to the original high-resolution
image?
5. Write a project report using the given project report template. All methods should be described, in addition
to the structure of your code. All results should be presented and discussed.
Per the project protocol, also upload all Matlab files with your submitted report.