Face detection

We covered a lot of operations on images in the preceding sections. In this recipe, let's delve deeper and cover an advanced operation such as face detection in images.

Getting ready

In this recipe, we will use Python's opencv module, so let's start by installing the required module.

  1. For using opencv Python bindings, we have to first install opencv on our computer. On my Mac OS X machine, I use the brew utility to install opencv this way:
            (ch10)chetans-MacBookPro:ch10 Chetan$ brew install 
            homebrew/science/opencv 
            ==> Tapping homebrew/science 
            Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-
            science'... 
            ... 
            ... 
            ==> Summary 
              /usr/local/Cellar/opencv/2.4.13.1: 277 files, 35.5M 
    
  2. Just installing opencv on your computer doesn't ...

Get Automate it! - Recipes to upskill your business now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.