Finding and reading license plates with OpenCV

We have already found our characters, which are license plate candidates. Now we need to determine which characters match, so that we can extract the text data and map the characters within the license plates.

First, we run each plate candidate through our gray_thresh_img function, which does our de-noising and binarization. In this case, we get a cleaner output because we are using a sub-image and not the complete image.

This is the extraction code we will use:

for plate_candidate in plate_candidates:         plate_candidate.grayimg, plate_candidate.thesholded = \                              gray_thresh_img(plate_candidate.plate_im)     plate_candidate.thesholded = cv2.resize(plate_candidate.thesholded,  (0, 0), fx = 1.6, fy = ...

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.