CAP 4401 – IMAGE PROCESSING Assignment 3 solution


Original Work ?


5/5 - (1 vote)

The purpose of this homework is to experiment with basic edge detection
Your program should be able to do the following:

• Edge Detection [6 points]

o Add edge detection for grey level images to your choice of options. Use Prewitt operator (3×3) to
compute dx and dy, compute gradient amplitude, compute edge direction
o Your program should be able to threshold gradient amplitude given some threshold.
o Your program should

 operate within specified ROIs (up to three ROIs)
 generate display of the amplitude of the gradient operator as intensity image
 generate binary edge image derived from amplitude of the gradient operator by thresholding
 generate binary edge image by further thresholding the above output using direction information
(e.g. display only horizontal (+/- 10 degree) edges or 45 degree +/- 10 degree edges etc.)

o Test your program on some grey level images
o [Extra credit – 1 Point] Implement Prewitt (5×5) operator for directional derivatives computations, then
compute edge amplitude and direction as before, compare results with Prewitt(3×3) mask

• Color processing [4 points]

o Apply the edge detection to R,G,B components independently, then combine all three sets of edges into
one image, experiment and discuss results
o Add color edge detection by applying edge detector to the I-component (using RGB <> HSI conversion),
display amplitude and thresholded magnitude (binarized) results.

o Compare utilization of RGB vs HSI for color edge detection
o [Extra credit – 1 point] Add color-edge detection by applying Prewitt edge detection to H and S
component, display amplitude and thresholded magnitude (binarized) results.
Note one Prewit 5×5 mask (Dx), Dy is the transpose
-2 -1 0 1 2
-2 -1 0 1 2
-2 -1 0 1 2
-2 -1 0 1 2
-2 -1 0 1 2

Write a report for this assignment
• Include input and output images (use several gray level and several color images as appropriate).
• Discuss performance of grey level edge detectors on images
• Discuss performance of your edge detector on color images. Discuss performance in RGB and HSI domains.

Support your conclusions by examples.
• Make sure that you have extensive report for this assignment (not just few comments).

How to submit
• Submit paper report in class on the due date
• See TA help desk for instruction on program submission and testing.