The first task will involve doing a little background reading on Dynamic Programming to get up to speed. The second task is to write the code:
Search Space Write a function which takes the two initial contours as inputs and returns an M N matrix containing the pixel intensities at each point in the search space. Hint: Since these points will not typically lie in the center of a pixel you may elect to select the nearest pixel in the image, or you may choose a more advanced scheme for some bonus marks.
Dynamic Programming Algorithm Write a function which takes the two initial contours and the image as parameters and returns the optimal contour. Note: This function will call the Search Space function above.
Finally you should present your results in a short report. The report must be no longer than 3 sides of A4 (not including diagrams, tables, gures or listings).
Here are some things that you could discuss in the report:
How does the algorithm scale with M? Try varying M over a sensible range, and use the tic toc function in Matlab to estimate the scaling. Does this agree with theory?
How robust is the solution to changes in ? You should initially test and report the results of your algorithm using = 0:5, but later you could report how the results changes when you vary it.