Drawing Faces part 2

Drawing Faces part 2

This particular aspect of the stories about you project has been on the back-burner for most of this year. I had thought to go the route of implementing an AAM model (Active Appearance Model) algorithm. This is a computer vision techniques which uses a statistical technique to build and then fit a set of features to an image of a face.  There is some pretty nifty work being done on this, my interest was initially sparked by this paper ”A High Resolution Grammatical Model for Face Representation” , by Xu, Chen and Zhu at UCLA.

An initial search for software implementations turned didn’t turn up much that was useful (binaries, matlab or windows only code).  The people at visionopen released opensource aam building code, but recently decided they couldn’t release the fitting code.  The only other source code I could find was RAVL, a vast and sprawling computer vision library from the University of Surrey - not much documentation of the AAM code.  To implement it would involve first building the model I wanted by annotating images in a face database, and then experimenting with the fitting process.  Looked like at least a month full time work to me, with only a moderate chance of success in that timeframe.

This led me to pause and assess.  Having switched from Vigra computer vision software to OpenCV (which has a funky but usable python interface), I decided to have a look at their edge detection code, via one of their demos - edge.py.  After a day’s mucking around I came up with this process.  It uses standard canny edge detector, to reduce the image to a series of “edgels” (edge pixels), it can then be contoured to convert the edgels to lines, a further curve fitting stage and the image can be reduced to a discrete set of lines.  By adjusting the threshold on the edge detector iteratively the code seeks an optimum number of lines, getting some control over the complexity of the image.  Each separate line segment has been coloured here to distinguish it.

Open video (H.265)