[SOLVED] MSBD5010 Assignment 2

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon assign2-p3degw.zip (470 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
🔒 Securely Powered by:
Secure Checkout
Rate this product

Overview

The assignment is designed for investigating three typical segmentation methodologies, which are watershed segmentation algorithm, active contour model and Hough transform respectively. You cannot also use the built-in functions relating to the watershed algorithm, active contour model and circular Hough transform. All the work should be submitted via Canvas system.

Programming assignment specifics

Part 1: Watershed segmentation algorithm

You need to complete the implementation of the routine in my_watershed.m. It leverages the Watershed segmentation algorithm to segment all the circles in the input image. You are not allowed to use the watershed(), imdilate() ,or other related built-in functions for this question.

  1. a)  Given an inverse distance map of the input image, compute the segmentation label map using Watershed segmentation algorithm defined in the lecture notes. Assign 0 for ridge/dam and unique integer in [1, …, n] for each region.
  2. b)  Extract the ridge/dam pixels and set it to 1. Then, apply binary dilation to the ridge/dam map.
  3. c)  Superimpose the image of dilated ridge/dam map and original image to separate distinct circles in the original image.

The sample output for this task is shown below:

1/3

Part 2: Active contour model

You need to complete the implementation of the routine in my_active_contour.m. It leverages the snake contour model proposed by Kass etc. in 1988 to segment the leaf in the input image. You are not allowed to use the conv(), gradient(), imfilter(), fspecial(), circshift(), interp2(), or other related built-in functions for this question.

The sample output for this task is shown in Fig. 3:

Note:

  1. You can suppose the weight 𝛼 and 𝛽 of the internal energy are uniform over

    the snake.

  2. The function for generating the initial contour has been provided

    (get_initial_contour.m). This function requires the user to left-click the mouse on the shown image to obtain the coordinates of control points for the initial contour. Then the initial contour will be generated automatically. Please right- click the mouse to stop the function. For the naïve snake model, the initial contour should be close to the object boundary, otherwise the final active contour will fail to converge to the desired location. The TAs will try their best to mark the control points as close as to the image boundary during grading.

  3. Please state the derivation process of the matrix A (Lecture note: image- segmentation-part-2). You can either write your statement in the provided comment area in the Matlab code, or write it down in a .txt file or .pdf file. (10%)
  4. When updating the next locations of the contour, you are required to implement your own interpolation method. The nearest interpolation is not allowed to used. (10%)
  5. For your reference: Kass, Michael, Andrew Witkin, and Demetri Terzopoulos. “Snakes: Active contour models.” International journal of computer vision 1.4 (1988): 321-331.

Part 3: Hough transform

You need to complete the implementation of the routine in hough_transform.m that can be used to detect circles in a binary image with circular Hough transform. Given that the range of radii of the circles in the input image is [40, 80] pixels. You are not allow to use the imfindcircles() Matlab built-in function for this question.

a) Find the edge of the input image
b) Perform the circular Hough Transform and create a variable ‘Accumulator’ to store the bin counts. (10%)
c) Search for the highest count cells in the Hough accumulation array. (5%)

Sample run of the programming assignment

The main routine of the assignment including displaying the final results is well written in the msbd5010_assign2.m file. After completing all the functions, you are supposed to get figures on the screen when you run the command below in the MATLAB environment.

>> msbd5010_assign2;

3/3

  • assign2-p3degw.zip