Haar cascade Detection for License Plates with OpenCV

Published on 2022-09-23

Recently I needed to detect license plates in a power efficient way. Object detection using Haar feature based cascade classifiers, is proposed by Paul Viola and Michael Jones in there paper "Rapid Object Detection using a Boosted Cascade of Simple Features" in 2001. It's a power efficient machine learning model.

Training Haar feature based model involve bunch of positive images (in our case images with license plates) and negative images (images without license plates). here is nice tutorial on training the model.

For our case we didn't need to train a model. OpenCV comes with few already trained models. Two of them are for detecting number plates. I tried both of them on our dataset and chose the best performing one. It managed to detect about 10-15% of license plates on our dataset.

Sample images - both positive and negative detections,