0% found this document useful (0 votes)
49 views10 pages

Akash Ha

ppt

Uploaded by

sravan kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views10 pages

Akash Ha

ppt

Uploaded by

sravan kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

PYTHON HOME ASSIGNMENT

VEHICLE NUMBER PLATE RECOGNITION

ELECTRONICS AND COMMUNICATION ENGINEERING

SUBMITTED BY

4/4 BTECH ECE-D

SUBMITTED TO:

MADHAVI LATHA

Asst.Professor

Department of Information Technology

Velagapudi Ramakrishna Siddhartha Engineering College


CONTENTS

1.Abstract

2.Introduction

3.Flow chart

4.Source Code

5.Results

6.Conclusion
ABSTRACT

License Plate Recognition is a computer system that recognizes any digital image automatically
on the number plate. This system includes various operations such as taking pictures, localizing
the number pad, truncating characters and OCR from alphanumeric characters. The main idea
of this system is to design and develop effective image processing techniques and algorithms
to localize the license plate in the captured image, to divide the characters from that number
plate and to identify each character of the segment by using the Open Computer Vision Library.
This has been implemented using python programming language. Many applications can be
implemented by using this system, such as security, highway speed detection, violation of light,
identification of handwritten text, discovery of stolen cars, automatic fee collection systems.

Keywords: Open CV, identifying the vehicle, number plate recognition, OCR(optical
character recognition).
INTRODUCTION

License Plate Recognition or LPR for short, involves three major steps. The steps are as follows

1. License Plate Detection: The first step is to detect the License plate from the car. We will
use the contour option in OpenCV to detect for rectangular objects to find the number plate.
The accuracy can be improved if we know the exact size, color and approximate location of
the number plate. Normally the detection algorithm is trained based on the position of camera
and type of number plate used in that particular country. This gets trickier if the image does
not even have a car, in this case we will an additional step to detect the car and then the license
plate.

2. Character Segmentation: Once we have detected the License Plate we have to crop it out
and save it as a new image. Again this can be done easily using OpenCV.

3. Character Recognition: Now, the new image that we obtained in the previous step is sure
to have some characters (Numbers/Alphabets) written on it. So, we can perform OCR (Optical
Character Recognition) on it to detect the number.
FLOW CHART
SOURCE CODE

import numpy as np

import cv2

import imutils

import sys

import pytesseract

import pandas as pd

import time

image = cv2.imread('car.jpeg')

image = imutils.resize(image,width=500)

cv2.imshow("Original Image",image)

gray = cv2.cvtColor(image,cv2.COLOR_BGR2GRAY)

gray = cv2.bilateralFilter(gray,11,17,17)

edged = cv2.Canny(gray,170,200)

(new, cnts) =
cv2.findContours(edged.copy(),cv2.RETR_LIST,cv2.CHAIN_APPROX_SIMPLE)

cnts=sorted(cnts,key = cv2.contourArea,reverse = True)[:30]

NumberPlateCnt = None

count = 0

for c in cnts:

peri = cv2.arcLength(c,True)

approx = cv2.approxPolyDP(c,0.02*peri,True)

if len(approx) == 4:

NumberPlateCnt = approx
break

# Masking the part other than the number plate

mask = np.zeros(gray.shape,np.uint8)

new_image = cv2.drawContours(mask,[NumberPlateCnt],0,255,-1)

new_image = cv2.bitwise_and(image,image,mask=mask)

cv2.namedWindow("Final_image",cv2.WINDOW_NORMAL)

cv2.imshow("Final_image",new_image)

# Configuration for tesseract

config = ('-l eng --oem 1 --psm 3')

# Run tesseract OCR on image

text = pytesseract.image_to_string(new_image,config=config)

#Data is stored in CSV file

raw_data = {'date': [time.asctime(time.localtime(time.time()) )],'v_number': [text]}

df = pd.DataFrame(raw_data, columns = ['date','v_number'])

df.to_csv('data.csv')

# Print recognized text

print(text)

cv2.waitKey(0)
RESULTS

INPUT IMAGE

OUTPUT IMAGE
CONCLUSION

The system works satisfactorily for wide variations in illumination conditions and
different types of number plates commonly found in India. It is definitely a better alternative
to the existing proprietary systems, even though there are known restrictions.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy