Worksheet Paper - Digital Images Processing
Worksheet Paper - Digital Images Processing
Worksheet Paper - Digital Images Processing
1
2
Question 2 (13 marks)
d) Give the formula for calculating D4 (city block distance) and D8 distance (chess
board distance). (2 marks)
Solution
e) Explain the concept, steps and equations involved in unsharp masking technique
in image enhancement. (3 marks)
Solution
3
Familiar Problems Solving: The aim of the questions in this part is to evaluate that the student has some basic knowledge of the key
aspects of the lecture material and can attempt to solve familiar problems of Intensity Transformation, Histograms, Spatial Domain
Filtering and image enhancement and programming these concepts using MATLAB.
Question 3 (4 marks)
Write a Matlab script code to display the histogram of an image using a bar graph; reduce the resolution of the
horizontal axis into 10 bands. Add suitable horizontal and vertical axes, xtick and ytick for your graph.
Solution
Question 4 (4 marks)
Write matlab script code to read a gray scale image named "pout.tif" and apply the following mathematical
function to stretch its contrast levels:
1
g
E
1 +
m
f
Where: g is the enhanced output image , f is the input image, m and E must be interactively entered by the user
using Matlab input command. Display the original and the contrast stretched images.
Solution
4
Unfamiliar Problems Solving: The aim of the questions in this part is to evaluate that the student has knowledge of the key
aspects of the lecture material and can attempt to solve unfamiliar problems of Intensity Transformation, Histograms,
Spatial and Frequency Domains Filtering and image enhancement, image restoration and programming these concepts
using MATLAB.
Question 5 (6 marks)
Write an M-function for grayscale input image; call it "immaxmin" to generate two images:
The first image contains values computed by finding the maximum value of a 3x3 pixel environment
(neighborhood of required pixel) and by setting the resulting center pixel to this value.
The second image contains values computed by finding the minimum value of 3x3 neighborhood of
required pixel and by setting the resulting center pixel to this value.
Use preallocating array for image.
Use low-level processing.
Solution
5
Question 6 (6 marks)
Write a matlab function called "Noise_EdgeFilter" that accepts a string (image file name) and displays images as
shown in figure 1 (original image, image using Gaussian filter, Laplacian image and image using Laplacian
filter).
Do the following steps with the input image:
To reduce the noise use the low pass linear spatial filter "Gaussian".
For edge detection use the high pass linear spatial filter "Laplacian".
Use fspecial matlab command to generate the filters mask.
Figure 1
GOOD LUCK
6