Computer Vision cs682 Due: Mar. 17, 2009 Spring 2009 Dr. Duric Homework #2 (35p) Your second homework involves extending your vision system for locating humans in a digital image. This homework has three stages: 1. (15p) Computing edges for a background image and for an image with a human in it. 2. (10p) Subtracting edge images to create a difference image and classifying edges in the difference image. 3. (10p) Connected component analysis to identify the human in the image. 1. Computing edges for a background image and images with humans You should use the programs provided with this description to gain experience and some intuition with edge detection. You should apply these programs to all supplied images. Those programs are BiSmooth.m (binomial smoothing), Gradient.m (gradient computation), ColorGradients.m (color gradients), NMS.m (non-maxima suppression), and Hysteresis.m (hysteresis thresholding as in Canny edge detector). These programs work for gray-level images only. To compute edges in color images you should use ColorGradients function. You should read the programs to become familiar with some simple Matlab functions used in them. In addition you should use Matlab function quiver to display image gradients. Here is an example: > A = imread('fr05.tif'); > A1 = BiSmooth(A,8); > [Gx,Gy] = Gradient(A1); > m1=NMS2(Gx,Gy,3); > m1 = Hysteresis(m1,3); > [I,J] = find(m1>0); % row and column indexes > In = find(m1>0); % indexes in a vector form > [M,N] = size(m1); > quiver(J,M-I+1,Gx(In),Gy(In),1) Create a web page and post the original and gradient images (vector fields) - email the URL to me at zduric@cs.gmu.edu. You can save your figures using print command in tiff, jpeg, or eps formats. You should post the results for at least three different images. 2. Subtracting edge images to create a difference image and classifying edges in the difference image In this part you will create difference images for Dx (x component of gradient) and Dy (y component of gradient). These difference images will have high values when gradients in the background and the current images are different and low values when they are similar. After computing difference images you will classify edges into three types: Background edges: these are edges that look similar in the background and current images. Occluded edges: these are background edges that are not visible in the current image; possibly because they are occluded by a foreground object Occluding edges: these are foreground edges that do not exist in the background image How would you do this classification? 3. (10p) Connected component analysis to identify the human in the image You will compute connected components for all your classified edges. What edges correspond to a human in an image? Note that you can box the edges corresponding to a human in the image? Are they connected? Could you suggest a background subtraction algorithm that would use edge subtraction? Image Files Image files can be obtained from http://www.cs.gmu.edu/~zduric/cs682/Images/ Program Files Matlab files can be obtained from http://www.cs.gmu.edu/~zduric/cs682/MatlabFiles/ Submitting your homework You will post on your web page the following: i. description of all algorithms used in your program, ii. complete testing results including labeled images of humans and any intermediate images that describe your work, iii. discussion of possible applications for your program. Email the url to zduric@cs.gmu.edu