程序代写代做代考 algorithm Programming assignment specifics (100%)

Programming assignment specifics (100%)
Part 1: Watershed segmentation algorithm (30%)
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.
• 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.
• Extract the ridge/dam pixels and set it to 1. Then, apply binary dilation to the ridge/dam map.
• 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:

Part 2: Active contour model (50%)
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:
• You can suppose the weight � and � of the internal energy are uniform over the snake.
• 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.
• 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%)
• 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%)
• 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 (20%)
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.
• Find the edge of the input image. (5%)
• Perform the circular Hough Transform and create a variable ‘Accumulator’ to store the bin counts. (10%)
• Search for the highest count cells in the Hough accumulation array. (5%)