Introducing pattern recognition for machine vision
Pattern recognition is an important part of machine vision or computer vision, to teach a machine to understand the object in an image.
In this section, we explore a paper by Paul Viola and Michael Jones about Rapid Object Detection using a Boosted Cascade of Simple Features. This paper describes a machine learning approach for visual object detection.
In general, the Viola and Jones approach is known as Haar Cascades. Their algorithm uses AdaBoost algorithm with the following classifier:
Fortunately, the OpenCV library has implemented Viola and Jones' approach to visual object detection. Other people also contributed to data training from Haar Cascades. You can find training data files on the OpenCV source code, which is located on <opencv_source_codes>/data/haarcascades/
.
You can now test detection of faces on an image using the Haar Cascades approach. You can write the following scripts:
import numpy as np import cv2 face_cascade ...