Book Image

Computer Vision Projects with OpenCV and Python 3

By : Matthew Rever
Book Image

Computer Vision Projects with OpenCV and Python 3

By: Matthew Rever

Overview of this book

Python is the ideal programming language for rapidly prototyping and developing production-grade codes for image processing and Computer Vision with its robust syntax and wealth of powerful libraries. This book will help you design and develop production-grade Computer Vision projects tackling real-world problems. With the help of this book, you will learn how to set up Anaconda and Python for the major OSes with cutting-edge third-party libraries for Computer Vision. You'll learn state-of-the-art techniques for classifying images, finding and identifying human postures, and detecting faces within videos. You will use powerful machine learning tools such as OpenCV, Dlib, and TensorFlow to build exciting projects such as classifying handwritten digits, detecting facial features,and much more. The book also covers some advanced projects, such as reading text from license plates from real-world images using Google’s Tesseract software, and tracking human body poses using DeeperCut within TensorFlow. By the end of this book, you will have the expertise required to build your own Computer Vision projects using Python and its associated libraries.
Table of Contents (9 chapters)

Finding plate characters

Next, we carry out our initial search to find plate characters. First, we find characters roughly, and then find candidates based on specific criteria.

Let's start with the following line in our Notebook:

%pylab notebook

We can now execute our function cell for imports, utilities, and to load our libraries:

import cv2
import numpy as np
import pickle
def getmatchingchars(char_cands):
char_list = []

for char_cand in char_cands:
ch_matches = [] \n",
for matching_candidate in char_cands:
if matching_candidate == char_cand:
continue
chardistance = np.sqrt((abs(char_cand.x_cent - matching_candidate.x_cent) ** 2) +
(abs(char_cand.y_cent - matching_candidate.y_cent)**2))
x = float(abs(char_cand.x_cent - matching_candidate.x_cent))
y = float(abs(char_cand.y_cent - matching_candidate...