Task 8 , Retrieve the owner info from vehicle number plate in the image
first we import required library and modules
import numpy as np
import matplotlib.pyplot as plt
import cv2
import pytesseract
import requests,json
import xmltodict
then i initialize the tesseract_ocr application file in windows 10 , (or maybe in linux)
then i intialize the haarcascade classifier “haarcascade_russian_plate_number.xml”
Then the rest of the program works in following steps :
step 1: convert image from BGR(cv2 default) to RGB
step 2: retrieve the vehicle plate image part using haarcascade which was initialized previously(i’m not including how because that would make this blog long and complex).
step 3: then i enlarge the image
step 4: convert the enlarged image to grayscale and remove noise by applying the blur(whichever blur you like be it gaussian or laplace).
step 5 : then using the pytesseract module it accesses the tesseract ocr on the computer and then we provide the image(we had previously processed) and it give output the detected characters in the image , i.e. the number plate number.
step 6: then i retrieve the car owner info using the extracted car number plate info using carregistraionapi( Its the name of the site if you search it you can get it , and regarding how i implement the api , you have to see my code).
step 7: then i display the extracted info using flask api , onto the web app interface.
I tried to simplify as much as i could because the application part is the real thing , but when explained that part it become large and complex that’s why i explained the outline working of the program , its nothing special nor a copyright but it helps in learning and understanding more.
thanks for reading .