Instructions: (cid:136) For all the questions, write your own functions. Use library functions for comparison only. (cid:136) Your function should take the speciļ¬ed parameters as inputs and output the speciļ¬ed results. (cid:136) Also provide the wrapper/demo code to run your functions. Your code should be self contained
i.e. one should be able to run your code as-is without any modiļ¬cations.
(cid:136) Vectorize your code. Non-optimized code may be penalized. (cid:136) For python, if you use any libraries other than numpy, scipy, scikit- image, opencv, pillow, matplotlib, pandas and default modules, please specify the library that needs to be installed to run your code. (cid:136) Along with your code, also submit a PDF with all the results and answers to subjective questions,
if any.
(cid:136) Put all your ļ¬les into a single zip ļ¬le and submit the zip ļ¬le. Name the zip ļ¬le with your name.
Q1. Image Downsampling:
(a) Downsample the image barbara.tif by a factor of 2. Downsample the image by selecting every second pixel in both directions (do not use library functions to downsample). What artifacts do you notice?
(b) Now, ļ¬rst ļ¬lter the image with a spatial domain Gaussian Low Pass Filter before downsampling the image. You can use a 5 Ć 5 window and Ļ = 1. Also experiment with diļ¬erent window sizes and Ļ values. Do you notice the mitigation of the artifacts? Compare your result with a library function.
(10+15=25M)
Q2. Edge Detection: For the grayscale images Checkerboard.png, NoisyCheckerboard.png, Coins.
png and NoisyCoins.png,
(a) Smooth the input image using a spatial domain Gaussian ļ¬lter. You can use a 5 Ć 5 window
and Ļ = 5.
(b) Use the Sobel/Prewitt operator to compute the image gradients, and then compute the
gradient magnitude. Use thresholding to get the edges.
(c) For the same set of images, use Laplacian operator to detect the edges. For the noisy images,
threshold the ļ¬ltered image before ļ¬nding the zero crossings.
Analyse the diļ¬erence between ļ¬rst-order and second-order gradient-based edge detectors for clean (10+10+15=35M) and noisy images.
Q3. Interest Point Detection: For the images Checkerboard.png and MainBuilding.png,
(a) Implement Harris corner detector. Experiment with diļ¬erent threshold values and report your
results.
1
(b) Modify the images by rotating, scaling and adding noise. Now detect corners in the modiļ¬ed
images. Analyse the diļ¬erence in performance as compared to the original images.
(15+15=30M)
2





