DMET1001 Assignment 1 Solved

30.00 $

Category:

Description

Rate this product

Implement the distance trasnform algorithm given in class. Use your algorithm to find: 1- The distance between the two ships in the image “Suez Canal.png”
2- The distance from each ship to both banks of the canal

Your algorithm should take the image as an input and the distance measure to be used (Euclidean Distance, City-block Distance or Chessboard Distance). The function should output the distance transform matrix after the first pass of the algorithm, the final distance transform matrix and the distances indicated above measured relative to the representative point of each ship. You can consider the representative point of the big ship at row number 150 and column number 200, while for the small ship at row number 310 and column number 175. You can use any already implemented functions to do any pre-processing needed before applying the distance trasnform algorithm. However, the distance transform should be implemented from scratch.

Deliverables:

  • Your code.
  • A description of the pre-processing steps you did and the reaons for doing each of them. Name the description file “Description.txt”
  • A .bmp file for the distance transform matrix obtained after the first pass using each of the distance measures mentioned above. Name the files “Suez_1_Euclidean.bmp”, “Suez_1_City.bmp”, “Suez_1_Chess.bmp”.
  • A .bmp file for the final distance transform matrix using each of the distance measures mentioned above. Name the files “Suez_final_Euclidean.bmp”, “Suez_final_City.bmp”, “Suez_final_Chess.bmp”.
  • A text file that shows the distances required above. Name your file “Dist.txt”.

Problem 2

Implement a function that applies a low-pass filter to an input gray-scale image. The function should take as inputs the input image, the type of the filter (ideal, Butterworth or Gaussian), the order of the filter if it’s Butterworth and the cutoff distance of the low-pass filter D0. It should output the filtered image. Apply the filter to the noisy image “GUC.jpg”. You need to implement these filters from scratch without using predefined functions in Python. You can use the Fourier Transform functions available in Python.

Deliverables:

  • Your code.
  • The output images obtained using Ideal Low-pass Filter with D0 = 5, D0 = 30 and D0 = 50. Name the output images “GUC_ILPF_5.jpg”, “GUC_ILPF_30.jpg” and “GUC_ILPF_50.jpg”, respectively.
  • The output images obtained using 1st order Butterworth Low-pass Filter with D0 = 5, D0 = 30 and D0 = 50. Name the output images “GUC_BLPF_5.jpg”, “GUC_BLPF_30.jpg” and “GUC_BLPF_50.jpg”, respectively.
  • The output images obtained using Gaussian Low-pass Filter with D0 = 5, D0 = 30 and D0 = 50. Name the output images “GUC_GLPF_5.jpg”, “GUC_GLPF_30.jpg” and “GUC_GLPF_50.jpg”, respectively.

2/2

  • Assignment-1-nvb6ob.zip