There are many approaches to object detection in OpenCV. These approaches can be categorized as follows:
- Color-based algorithms such as meanshift and Continuously Adaptive Meanshift (CAMshift)
- Template matching
- Feature extracting and matching
- Artificial Neural Networks (ANNs)
- Cascade classifier
- Pretrained deep learning models
The first three are the traditional approaches to object detection, while the last three are approaches of machine learning.
The color-based algorithms, such as meanshift and CAMshift, use histograms and back-projection images to locate an object in an image with incredible speed. The template matching approach uses the object of interest as a template and tries to find the object by scanning the image of a given scene. Feature extracting and matching approaches first extract all features, usually edge features and corner...