Perceptual Computing: Computer Vision Using Intel Performance Primitives Share your comment!

The latest hype surrounding facial recognition software: an app on your smart phone lets you take a picture of someone, then gives you a positive ID, including criminal record and social security number.

Certainly, facial recognition and matching technologies have made big advances. But the idea that a smart phone app will reveal confidential information about a photographed subject? Laughable.  

It’s a continuation of hype-fueled hopes following 9/11, when many airports installed facial recognition hardware and software. Not only did the technology fail to live up to its promise, it arguably made things worse through “false positive” identifications that sent authorities on unproductive goose chases.

Intel’s Longtime Vision

At one time, Intel maintained an open source technology called OpenCV. It provided basic computer vision, some enabling early, rudimentary facial recognition technology. About five years ago, Intel turned over OpenCV to Willow Garage and Itseez. OpenCV is under a BSD license [Downloads and details at].

Intel did not abandon its quest for a computer vision library, however. The company has included full support in its Intel Performance Primitives (IPP). It’s worth a look and a try as an element of the fascinating emerging area Intel calls Perceptual Computing. 

In this article we’ll look at how to isolate faces inside of photographs. Note: That is not the same as recognizing faces. I will simply show you how to identify the rectangular regions within photographs that probably contain faces (it’s not a 100% accurate science). Later, we’ll look at facial objects, such as noses and eyes.

These exercises are based on existing training files. After implementing them, we will train our own recognition files to allow the Intel technology to add additional objects that it recognizes to its quiver.

For perspective, think Microsoft’s Kinect add-on for the XBox 360 – basically, object recognition on steroids. If you have used a program such as Just Dance, you know that the XBox 360 knows the location of every body part while you are dancing.

We won’t promise to train you to the standards of Kinect technology. But the sky’s the limit here; party on the technology to come up with all sorts of great apps.

Besides XBox 360 and the spooky NSA stuff, there are lots of really useful applications for this technology. Nearly every digital camera now identifies faces within a photograph that is about to be taken. This enables the photographer to properly center the faces properly within the image area.

Inside the Intel Technology

The heart of the technology is a Haar Classifier. This loads an already-trained data file, which we will create from scratch in the next installment of this series. The data enables the classifier to identify objects in an image, which it does as a series of cascades.

First, the classifier establishes a general idea of what might be the target object type (such as a face). Then it gets much more specific, to the point that it has hopefully identified all objects in an image correctly. The process is not perfect. If you look at the sample project, you will see settings that you can experiment with for setting the sensitivity and distance. Check the CRecognizeFaces class in the RecognizeFaces.cpp file.

This demo program is based largely on the computer vision sample provided by Intel. It loads a single .BMP file, and then displays the same .BMP file with the faces outlined as shown in Figure 1. You will note a single false positive in this example.

Figure 1: This demo program identifies the rectangular regions in which faces can be found in the sample photo.

I encourage you to download the demo here. It is a Visual Studio 2012 project that uses the Intel computer and IPP. You can experiment with other pictures, and try changing the default settings.

In the next article, we will create our own Haar data and use it.

Posted on June 28, 2013 by Rick Leinecker, Slashdot Media Contributing Editor