Computer Science - The City College of New York
CSC I6716 - Spring 2011  3D Computer Vision

Assignment 2.
Edge Detection Exercise ( Due: March 8th before class)


Note:  Turn in a document (in writing) containing a list of your .m files, images showing the results of your experiments, and an analysis of the results.All the writings must be hard copies in print - you may hand them in during class, or put them in my mailbox in the CS main office . You also need to turn in your “soft” copies of your assignment via email. Send ONLY your source code to me by email  – please don’t send in your images and executable (even if you use C++).  You are responsible for the lose of your submissions if you don’t write  “CSC I6716 Computer Vision Assignment 2” in the subject of your email. Do write your names and IDs (last four digits) in both your hardcopy and softcopy submissions.


Choose one or two of the images on the course web page for this assignment or use an image of your own choice.  If you use a different image, be careful that the image has not been saved under JPEG using a high level of compression.  This often introduces artifacts into the image that confound subsequent analyses of the results.  For the most part, you should apply the edge operators to a grayscale version of the image. 

1.  Generate the histogram of the image you are using.  If it is a color image,  please first turn it into an intensity image and then generate its histogram.  Try to display your histogram.

2.  Apply the 1x2 operator and Sobel operator to your image and analyze the results of the gradient magnitude images.  Does the Sobel operator have any clear visual advantages over the 1x2 operator?  If you subtract the 1x2 edge image from the Sobel are there any residuals? (Note: don't forget to normalize your results as shown in slide # 29 of  feature extraction lecture: part 2)

3.  Generate edge maps of the above gradient maps.  You may first generate a histogram of each gradient map,  and only keep certain percentage of pixels  (e.g.  5% of the highest gradient  values) as edge pixels (edgels) . Use the percentage to find a threshold for the gradient magnitudes.

4. What happens when you increase the size of the kernel to 5x5 , or 7x7? Discuss computational cost (in terms of members of operations, and the real machine running times), edge detection results and sensitivity to noise, etc. Note that your larger kernel should still be an edge detector.

5.  Suppose you apply the Sobel operator to each of the RGB color planes comprising the image.  How might you combine these results into a color edge detector?  Do the resulting edge differ from the gray scale results?  How and why?