Stephen DiVerdi

Computer Science Portfolio

HMC CS192 Computer Vision

Our independent study's main focus it the creation of a head tracking system. The project lasts all semester, and will eventually incorporate a wide variety of tracking techniques. The final result will be the head tracker and a 3D modelled head moving in unison with a head in the video stream, hopefully with recognition of the face from a database of faces. Over the course of the semester, we will implement a variety of tracking techniques and evaluate their relative advantages and disadvantages.

Hue Tracking - We started out by tracking objects made up of similar-hue pixels. This involved converting the image from an RGB array to an HSV array, then tresholding the HSV pixels, connecting the components and reducing noise, and then calculating the centroid for each component. We implemented erosion and dialation to connect our components and reduce noise, using BFS to create the connected components. Our centroid calculation uses standard statistical moments. To speed calculations, we also implemented pixel subsampling. The slowest step here by far was grabbing the entire frame and converting it to HSV, so subsampling greatly sped up our processing.

Thresholding for flesh-colored pixels
Components after connecting and calculating centroids
Subsampling grabbing 1 out of every 4 pixels drastically increased our framerate

Contour Tracking - The next technique we tried was contour tracking. The user selects a set of pixels around some edge contour, and then the pixels positions' are updated by finding the greatest edge along the normal of the contour at that point. The contour is drawn with linear or cubic interpolation, and is resampled periodicially to keep the points evenly distributed along the edge. To improve the quality of the tracking between images, we tracked multiple contours each with a probability of fit and select the best one. We attempt to maintain area and basic topology of the contour.

Linear Contour
Cubic Contour
Bunched - without resampling, the points become bunched together like this

Texture Tracking -