Digital images processing Assignment, Study notes of Digital Image Processing

Digital images processing assignment

Typology: Study notes

2022/2023

Uploaded on 05/13/2023

merna-mohamed-1
merna-mohamed-1 🇪🇬

1 document

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
30 Nov 2013
CE 490 Introduction to Digital Image Processing
MIDTERM EXAM SOLUTIONS
Q1. (25 points) For the following 5 x 5 image f(x,y) with 3 bits per pixel, i.e.
pixel values in {0,1,..,7}:
f(x,y) = 0 0 1 1 2
0 1 1 2 4
1 1 2 4 5
1 3 4 5 6
3 3 5 6 7
(a) compute the histogram of the original image f(x,y),
(b) find a transformation function g(x,y) = T(f(x,y)) that will approximately
equalize the histogram of f(x,y). Find the transformed (equalized) image, g(x,y).
pf3
pf4
pf5

Partial preview of the text

Download Digital images processing Assignment and more Study notes Digital Image Processing in PDF only on Docsity!

30 Nov 2013

CE 490 Introduction to Digital Image Processing

MIDTERM EXAM SOLUTIONS

Q1. (25 points) For the following 5 x 5 image f ( x , y ) with 3 bits per pixel, i.e. pixel values in {0,1,..,7}: f ( x , y ) = 0 0 1 1 2 0 1 1 2 4 1 1 2 4 5 1 3 4 5 6 3 3 5 6 7 (a) compute the histogram of the original image f ( x , y ),

(b) find a transformation function g ( x , y ) = T ( f ( x , y )) that will approximately equalize the histogram of f ( x , y ). Find the transformed (equalized) image, g ( x , y ).

(c) Compare the histogram of output image to the original image histogram in part a).

Compared to the original histogram, the equalized histogram is less uniform due to only eight distinct intensity levels. Q2. (30 points) A 4 x 4 gray-scale original image f ( x , y ) is given below:

f ( x , y ) = 12 10 8 6 10 8 6 4 8 6 4 2 6 4 2 0

Compute the filtered output images after passing through a) the spatial linear filter as specified by the mask w 1 (by using zero-padding of the original image).

w 1

y=conv2(f,w, 'same'); y y = 12 4 3 4 16 8 6 5 13 6 4 2 8 3 2 0

Q4. (25 points) a) Explain the effect of reducing the sampling rate to one-fourth in the original Barbara image shown below. What causes these differences?

Aliasing effect occur due to sampling rate below Nyquist rate.

b) Explain the effect of reducing the quantization levels of the original Lena image from 256 (8-bit) to 8 (3-bit) as shown below. What causes these differences?

Contouring effect due to inadequate quantization.

c) Considering the processed (resulting) image on the right, what would be the most likely (3x3) spatial filter applied to the input image on the left, specify its mask. Input image Output image

Laplacian filter is used which enhances fine details (including noise) more than the 1 st^ order gradient (sobel) filter.

w Laplacian

d) Edges play an important role in our perception of images as well as in the analysis of images. Input image Output image

Describe one method which can detect lines/edges along x- and y- directions in an image (see output image)? Write down its mathematical operations on an input image f ( x , y ).

Edge detection along x- and y-directions can be done using