CSFG
English Deutsch Beta Español Beta język polski (2.6.0)
Chapters Curriculum Guides Appendices

Computer Vision
14.5. Face recognition

Computer Vision

  • 14.1. What's the big picture?
  • 14.2. Lights, camera, action!
  • 14.3. Noise
  • 14.4. Thresholding
  • 14.5. Face recognition
    • Project: Recognising faces
  • 14.6. Edge detection
  • 14.7. Depth
  • 14.8. The whole story!
  • 14.9. Further reading

Recognising faces has become a widely used computer vision application. These days photo album systems like Google Photos and Facebook can try to recognise who is in a photo using face recognition. The following photos were recognised in an application as being the same person, so to label the photos with people's names you only need to click one button rather than type each one in.

An application recognises these photos as being the same person

There are lots of other applications. Security systems such as customs at country borders use face recognition to identify people and match them with their passport. It can also be useful for privacy – Google Maps streetview identifies faces and blurs them. Digital cameras can find faces in a scene and use them to adjust the focus and lighting.

There is some information about how facial recognition works that you can read up as background, and some more information at i-programmer.info. If you're interested, there is also a Vox video on how Snapchat filters work that mentions facial recognition algorithms.

There are some relevant articles on the cs4fn website that also provide some general material on computer vision.

We also have a Viola-Jones Face Detection interactive available, supporting text will be added at a later date.

Thumbnail of Viola-Jones Face Detector interactive

Viola-Jones Face Detector

14.5.1.

Project: Recognising faces

First let's manually try some methods for recognising whether two photographs show the same person.

  • Get about 3 photos each of 3 people
  • Measure features on the faces such as distance between eyes, width of mouth, height of head etc. Calculate the ratios of some of these.
  • Do photos of the same person show the same ratios? Do photos of different people show different ratios? Would these features be a reliable way to recognise two images as being the same person?
  • Are there other features you could measure that might improve the accuracy?

You can evaluate the effectiveness of facial recognition in free software such as Google Photos or the Facebook photo tagging system, by uploading photos of a variety of people and seeing if it recognises photos of the same person. Are there any false negatives or positives? How much can you change your face when the photo is being taken to not have it match your face in the system? Does it recognise a person as being the same in photos taken several years apart? Does a baby photo match of a person get matched with them when they are five years old? When they are an adult? Why or why not does this work?

Previous:
Thresholding
Next:
Edge detection

Looking for something for primary schools? Check out CS Unplugged.

The Computer Science Field Guide is an online interactive resource for high school students learning about computer science.

Useful Links

  • About
  • Chapters
  • Interactives
  • Curriculum Guides

Community

  • Twitter
  • YouTube
  • GitHub

Help

  • Search
  • Glossary
  • Feedback

Switch to teacher mode

English | Deutsch | Español | język polski (2.6.0)

The Computer Science Field Guide material is open source on GitHub, and this website's content is shared under a Creative Commons Attribution-ShareAlike 4.0 International license. The Computer Science Field Guide is a project by the Computer Science Education Research Group at the University of Canterbury, New Zealand. Icons provided generously by icons8.

3.12.6

This definition is not available in English, sorry!