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 cv2import numpy as npimport pickledef 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)) ...

Get Computer Vision Projects with OpenCV and Python 3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.