Book Image

Mastering OpenCV 3 - Second Edition

By : Jason Saragih
Book Image

Mastering OpenCV 3 - Second Edition

By: Jason Saragih

Overview of this book

As we become more capable of handling data in every kind, we are becoming more reliant on visual input and what we can do with those self-driving cars, face recognition, and even augmented reality applications and games. This is all powered by Computer Vision. This book will put you straight to work in creating powerful and unique computer vision applications. Each chapter is structured around a central project and deep dives into an important aspect of OpenCV such as facial recognition, image target tracking, making augmented reality applications, the 3D visualization framework, and machine learning. You’ll learn how to make AI that can remember and use neural networks to help your applications learn. By the end of the book, you will have created various working prototypes with the projects in the book and will be well versed with the new features of OpenCV3.
Table of Contents (14 chapters)
Title Page
Mastering OpenCV 3 Second Edition
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

ANPR algorithm


Before explaining the ANPR code, we need to define the main steps and tasks in the ANPR algorithm. ANPR is divided in two main steps: plate detection and plate recognition. Plate detection has the purpose of detecting the location of the plate in the whole camera frame. When a plate is detected in an image, the plate segment is passed to the second step (plate recognition), which uses an OCR algorithm to determine the alphanumeric characters on the plate.

In the following diagram, we can see the two main algorithm steps: plate detection and plate recognition. After these steps, the program draws over the camera frame the plate's characters that have been detected. The algorithms can return bad results or may not return any result:

In each step shown in the previous figure, we will define three additional steps that are commonly used in pattern recognition algorithms. These steps are as follows:

  1. Segmentation: This step detects and removes each patch/region of interest in the...