Assignment 2 DIP 2019
Assignment 2 DIP 2019
Dr S.Natarajan
Professor and Key Resource Person
Department of Computer Science and Engineering
PES University
Bangalore , India
[email protected]
9945280225
Assignment 2 DIP 2019
1 You are given two images flower.jpg and lena.jpg. Write a MATLAB program to do the
following . (i) Create a new image by interchanging the phase and amplitude of these images.
(Hint: Take DFT of these and separate the magnitude and phase of the two
images)
(ii) Compute the inverse DFT of both the images
(iii) Compute the inverse DFT of only the phase components and display
2. (a) Why do we perform image processing in frequency domain although images are generally
represented in spatial domain?
(b) Explain why the Fourier transform phase of an image alone often captures most of the
intelligibility of the image.
Assignment 2 DIP 2019
3. Given two input matrices x(m ,n) and h(m ,n) perform linear convolution between these two
matrices. 1
x(m ,n) = 4 5 6 h(m, n) = 1
7 8 9 1
4. Compute the 2D DFT of the 4 X 4 gray scale image and also the corresponding IDFT.
1 1 1 1
V = 1 1 1 1
1 1 1 1
1 1 1 1
Assignement 2 DIP 2019 Questions
5. (a) Perform morphological dilation of the image A with the structuring element B.
(b) Perform morphological .erosion of the image A with the structuring element B
The origin of B is underlined (element (2,2) in the image)
Assignement 2 DIP 2019 Questions
6. (a) Open image A with the structuring element B(at position (1,1) which is underlined).
(b) Close image A with the structuring element B ( at position (1,1) which is underlined)
Assignment 2 DIP 2019 Questions
7. The input image and structuring elements are shown below. Find the hit or miss transformation
for the input image.
Structuring Structuring
element B element W-B
Input Image
Assignment 2 DIP 2019 Questions
8. (a) How do you trace Hough Transform algorithm for the set of points (0,0), (1,1),(2,2), (3,3) and
(2,4) as data.
(b) If we apply the Hough transform on the image below, what would be the maximum value for the
accumulator cell in the (r,θ) space? What is the corresponding (r,θ) value?
Note: each black square denotes a point and the numbers are the coordinates
Assignment 2 DIP 2019 Questions
9. Write a MATLAB code for Otsu segmentation using suitable inputs. OR You may write a
Python/OpenCV code for Otsu segmentation using suitable inputs.
Assignment 2 DIP 2019 Questions
10. Segment the following image using split and merge strategy. The logical predicate P(Ri) = TRUE,
when all the pixels in the region Ri have the same intensity. Construct the corresponding quadtree.