Starting from:

$29.99

EE5537 Homework 1 Solution

Remarks:
• This homework is intended to build on the concepts you learnt in class.
• Do not use built-in functions for any of the binary or gray scale operations in this assignment. For thefirst question, you can simply reuse your code from the previous assignment.
• Please turn in Python Notebooks with the following notation for the file name: your-roll-numberhw1.ipynb.
1 Binary Morphology
Continuing from the previous assignment, write code to verify that:
1. DILATE is the dual of ERODE with respect to complementation. (1)
2. ERODE is the dual of DILATE with respect to complementation. (1)
3. MEDIAN is its own dual with respect to complementation. (1)
Verify this by showing that the difference between the images from the direct and complement paths is indeed zero.
2 Gray scale operations
Write a program/function to do the following:
1. Perform simple linear point operations for the following cases:
(a) J = P.I. (1)
(b) J = P + L. (1)
In each case, verify that the histogram of J is related to the histogram of I according to the relation discussed in class.
2. Full scale contrast stretch (FSCS). Verify your result by printing the min and max pixel values beforeand after applying FSCS. Also, plot the histogram of the image before and after applying FSCS. (1)
3. Log magnitude compression (always followed by FSCS). Plot the histogram of the image before andafter applying log magnitude compression. (1)
4. Histogram flattening. Plot the histogram of the image before and after applying histogram flattening.
(3)
3 Zooming
Write a program to zoom an image by 1.5 times along each axis using the following techniques discussed in class:
1. Nearest neighbor. (5)
2. Bilinear interpolation. (5)
Test your program using three of your favorite images from the above set. Comment on the quality of the two techniques and compare their computational complexity.

More products