Question: Create a MATLAB Code 1) Active Contours (60%) Implement the Greedy Algorithm described by Williams and Shah to evolve active contours. Your code should: a)

Create a MATLAB Code 1) Active Contours (60%) Implement the Greedy AlgorithmCreate a MATLAB Code

1) Active Contours (60%)

Implement the Greedy Algorithm described by Williams and Shah to evolve active contours.

Your code should:

a) Read an image.

b) Compute the smoothed gradient of the image, and find the gradient magnitude at each pixel.

c) Obtain the initial position of a contour from the user (you can use the getline function of the MATLAB for this purpose), and round the positions obtained from the getline function to integers.

d) If the distance between the points in the user input is large, interpolate to add extra points. The distance between the points should be around 5 pixels.

e) Implement the rest of the Greedy Algorithm according to the paper by Williams and Shah

Pseudo-code for the Greedy Algorithm Index arithmetic is modulo n. Initialize ai, Bi, and yi to 1 for all i. do /* loop to move points to new locations */ for i = 0 ton /* point 0 is first and last one processed */ Emin = BIG for j = 0 to m - 1 /* m is size of neighborhood */ E; = a;Econ,j + B: Ecurv,; + y;Eimage.j if E; Ci-1 and c; > Citi /* if curvature is larger than neighbors */ and c; > thresholdi /* and curvature is larger than threshold */ and mag(v) > threshold2 /* and edge strength is above threshold */ then B; = 0 /* relax curvature at point i */ until ptsmoved Ci-1 and c; > Citi /* if curvature is larger than neighbors */ and c; > thresholdi /* and curvature is larger than threshold */ and mag(v) > threshold2 /* and edge strength is above threshold */ then B; = 0 /* relax curvature at point i */ until ptsmoved

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!