OpenCV is a wonderfully full-featured computer vision library. I’ve just written a very simple demo of the built-in face recogniser. It finds a face and scales it to a fixed size. If you watch my eyes in the viewfinder window, you’ll see they stay pretty much in the same place however I move around the room.
All sorts of things could be done to improve the frame-rate if needed, but this was just a quick test I put together over a couple of hours while learning about the library. Back in ancient history, when I did my PhD, this kind of thing would have taken weeks… The title of this post, if you’re not familiar with it, is from the famous closing scene of Sunset Boulevard, which you can see here. Of course, as soon as I thought of using this title, I realised that I could also grant Gloria Swanson’s greatest wish. So here’s my version…
It needs some smoothing, but still quite fun.
The camcorder I use for training has a focus facility involving face recognition. So the trainee can get really agitated and mobile, but the face is always in focus. And in the viewfinder a similar little rectangle follows the face everywhere.
Nice. However, this recognition is even more impressive, and much faster (20fps)
http://www.engadget.com/2011/03/31/zdenek-kalals-object-tracking-algorithm-learns-on-the-fly-like/
Indeed – that’s very cute. Bet it wasn’t done in a couple of hours on a Sunday afternoon, though 🙂