Question: WARNING: It is forbidden to use array operations that perform complete 2 D array processing in one command during our course! For any 5 1

WARNING: It is forbidden to use array operations that perform complete 2 D array processing in
one command during our course!
For any 512512 gray-scale digital image in our Images database (example images are: cameraman, house,
jetplane, lake, livingroom, walkbridge), do the following:
Write a MATLAB program to change (downsample) the spatial resolution to 256256,128128, and 3232
pixels. Save these three images as 512512 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. Also, to read in a tif-format, such as "walkbridge.tif", you
will need the following commands:
f= imread('walkbridge.tif'); (Read the image into " f ")
f=f(:,:,1); (Get the first "layer" of the tif image)
Create an interpolated 512512 image from your 3232 image of part 1(before you upsampled it to
512512!) using either bilinear, bicubic, or inverse-distance interpolation, as discussed in G&W Sect. 2.4
and the Project Material document "Proj1-Interpolation.pdf."
Write a program to change the gray-level quantization of the original 512512 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,dots252.
WARNING: It is forbidden to use array operations

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!