This face-boxer.py script is more-or-less the same code that you'll find in the OpenCV tutorial: Face Detection using Haar Cascades. For another variation, with more explanation, check out RealPython's tutorial.
The face-boxer.py
script is designed to be run from the command-line. It has two required arugments:
- The path to a XML file containing a Haar-cascade of visual features. In this example, it will be the features that make up a face.
- The path to an image file that you want to perform face-detection on. You can pass in more than one image file as space-separated arguments.