ENGN 6528/4528 Assignment
[For this assignment, we are going to provide tutorial but no lab sessions.
When you run contour_demo.py/contour_demo.m, it saves the output contours in the
folder output/demo, prints out the 3 metrics, and produces a precision-recall plots at
contour−output/demo_pr.pdf. Overall max F-score is the most important metric, but
we will look at all three.
a. (a) [1 pts] Warm-up. As you visualize the produced edges, you will notice
artifacts at image boundaries. Modify how the convolution is being done to
minimize these artifacts.
b. (b) [3 pts] Smoothing. Next, notice that we are using [−1, 0, 1] filters for
computing the gradients, and they are susceptible to noise. Use derivative of
Gaussian filters to obtain more robust estimates of the gradient. Experiment
with different sigma for this Gaussian filtering and pick the one that works the
c. © [6 pts] Non-maximum Suppression. The current code does not produce thin
edges. Implement non- maximum suppression, where we look at the gradient
magnitude at the two neighbours in the direction perpendicular to the edge.
We suppress the output at the current pixel if the output at the current pixel is
not more than at the neighbors. You will have to compute the orientation of
the contour (using the X and Y gradients), and implement interpolation to
lookup values at the neighbouring pixels.
In the code, you may need to define your own edge detector with nonmaximum suppression. Note that all the functions are called in
d. (d) [Upto 5 pts] Extra Credit. You should implement other modifications to
get this contour detector to work even better. Here are some suggestions:
compute edges at multiple different scales, use color information, propagate
strength along a contiguous contour, etc. You are welcome to read and
implement ideas from papers on this topic.