Getting started with OpenCV
Computer vision is a field related to machine learning that aims at developing algorithms and systems to analyze images and videos automatically. A typical example of computer vision's application is face detection: a system automatically detecting human faces in an image. This is the kind of system we'll build in this chapter.
To help us in this task, we'll use OpenCV, which is one of the most popular computer vision libraries. It's written in C and C++ but has bindings to make it usable in many other programming languages, including Python. We could have used scikit-learn to develop a face detection model, but we'll see that OpenCV already includes all the necessary tools to perform this task without having to manually train and tune machine learning estimators.
To begin with OpenCV, we'll implement a simple Python script to perform face detection locally using a computer webcam:
- The first step is, of course...