Alright, Mr. DeMille, I’m ready for my close-up.

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.

Enjoyed this post? Why not sign up to receive Status-Q in your inbox?

3 Comments

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.

Got Something To Say:

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

*

© Copyright Quentin Stafford-Fraser