A face icon in the style of the contrast symbol

 

When it comes down to it, a photograph is merely a collection of tiny dots that combine to make a recognizable image.

A facial detection system attempts to find patterns in these small dots. There are a number of criteria a face detection app utilizes as it searches for faces, but one aspect it looks for which impacts on this is areas of intensity and darkness.

Extremes in lighting conditions can have an enormous effect on success in detecting faces. An area that is shadowy and dark, or an area bleached out in lightness, may include a face. However from a computer's point of view, the visible shade it sees in the image is outside its programmed accepted range of facial hues. The computer will not detect a face in this situation.

 

The Problem of Uneven Lighting

 

Technically, over or under illumination in face images tend to result in a skewed intensity distribution. With uneven illumination, you end up with shadow, underexposure, or overexposure in your image.

The algorithms used in the facial detection software are frantically searching for particular combinations of pixels, which could indicate a face. With shadow and underexposure, all the computer sees is a patch of darkness. With overexposure, all it sees is a patch of whiteness and glare. The computer does not see clearly delineated faces.

The Kairos Facial Recognition API operates by analyzing still photographs that include faces. Images are changed to grayscale before any face detection or recognition processing is done. Grayscale is considered good enough to find the patterns that need to be matched. Color is seen as irrelevant in this situation, as the exact colors get skewed by variations in lighting and indeed camera type. Intensity and darkness are the key factors affecting successful results here.

 

What Can You Do to Help Minimise the Effects of Uneven Lighting?

 

Clearly the easiest way to ensure that lighting doesn't affect the quality of detection from a photo is to make sure that there is even lighting in the original picture.

When composing your photograph avoid pointing the camera at bright lights, the sun or indeed any area with strong back-lighting. Try and take your picture in a brightly lit, evenly illuminated environment.

Similarly, harsh sideways lighting can cause issues. Faces that are lit from only one side or with an intense overhead light can show dark shadows.

Another potential problem environment is an area like an office with clusters of harsh overhead lighting. Office spotlights concentrated in ceilings can cause dark spots under the eyes.

Outdoor photography can be problematic. Images taken on an overcast day may give usable results, but bright sunny days tend to play havoc with most cameras’ auto exposure.

 

What About Video?

 

The Kairos Emotion Analysis API, Crowd Analytics SDK, and IMRSV for Marketers all make their analysis from live video. Clearly face detection is a key component for all of these products, so consistent lighting levels is an essential requirement for successful results.

Color does have some use in these products. It is used for tracking - the detector is grayscale, but tracking is required once the face is no longer visible.

Again you need to try and position your camera in even lighting, without strong back or sidelights. Make sure that you don't point the camera directly at strong lights, too.

In the case of IMRSV, you are likely to be using the cameras in a retail environment, which means that it is likely that the camera will be in a well-lit environment. Just be careful that any "mood lighting" you use does not skew the intensity balance of the video created. A dim bar might give acceptable results, but a busy nightclub would probably not be a particularly fruitful place to create an IMRSV display.

An outdoor video display would give patchy results because the success of the detection will be very weather-dependent - reasonable results on overcast days, matched by poor results on sunny days.

We have a Best Practices Guide on our website that gives you a guide as to how you will get the most suitable results from your attempts at facial detection and recognition.

 
 
 
 
 

FOR DEVELOPERS

Verify people in your apps—Integrate face recognition with our easy-to-code API.

CREATE ACCOUNT

FOR BUSINESSES

Discover the benefits of Kairos Face Recognition—Let's connect.

CONTACT SALES

WE LOVE TO TWEET

FOLLOW US

Ready to get started with Kairos?