Individual Assignments of Emerging
Individual Assignments of Emerging
Individual Assignments of Emerging
OUESTION 1
Automatic License Plate Recognition system is a real time embedded system which automatically
recognizes the license plate of vehicles. There are many applications ranging from complex security
systems to common areas and from parking admission to urban traffic control. Automatic license
plate recognition (ALPR) has complex characteristics due to diverse effects such as of light and
speed. Most of the ALPR systems are built using proprietary tools like Matlab. This paper presents
an alternative method of implementing ALPR systems using Free Software including Python and the
Open Computer Vision Library. Keywords—License plate, Computer Vision, Pattern Recognition,
Python, OCR.
OpenCV
OpenCV (Open Source Computer Vision) is a library of programming functions mainly aimed at real-
time computer vision. Originally developed by Intel's research center in Nizhny Novgorod (Russia), it
was later supported by Willow Garage and is now maintained by Itseez. The library is cross-platform
and free for use under the open-source BSD license.
#@programming_fever
import cv2
import imutils
import numpy as np
import pytesseract
img = cv2.imread('D://skoda1.jpg',cv2.IMREAD_COLOR)
contours = imutils.grab_contours(contours)
screenCnt = None
for c in contours:
if len(approx) == 4:
screenCnt = approx
break
if screenCnt is None:
detected = 0
else:
detected = 1
if detected == 1:
mask = np.zeros(gray.shape,np.uint8)
new_image = cv2.drawContours(mask,[screenCnt],0,255,-1,)
new_image = cv2.bitwise_and(img,img,mask=mask)
(x, y) = np.where(mask == 255)