Signal Final Review

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Automatic Number Plate Recognition

System
SIGNALS AND SYSTEM- ECE1004
AMAN RAJ GUPTA Ch.Saikiran Shabd Prakash
(18BEC0321) (18BEC0278) (18BIS0031)

ECE100
Abstract:
even without the availability of human
4
The main objective of our project is to
force.
recognize and display the Registration
numbers of vehicles which are scanned In this project is basic application of
by the camera. image processing by virtue of which
As number plate is one of the unique we can capture image convert it into
identifications used by the government the form readable by computer
officials to recognize a vehicle. followed by noise reduction and
Automatic number plate recognition is various filtering techniques which
one of the best ways to fulfil this include sobel edge detector. Sobel
demand. The number written on the edge detector acts as 3X3 mask
plate is can be used by the police creating an image emphasizing edges.
officials to stop the criminal activities Further the advantages and
taking place. Traffic police can use disadvantages of the process involved
Automatic number plate recognition to is discussed.
keep check on vehicles which violate
the traffic rules and are driving too Keywords:
fast. Automatic Number Plate Recognition
This system can also be used for (ANPR), MATLAB, Conversion,
surveillance, traffic management. This Segmentation, Character Recognition.
system can be put to surveillance 24/7

1
Introduction: Block Diagram
The Automatic Number Plate
Recognition System is an age-old
technology which is now getting
enhanced day by day by various
algorithms developed by signal
scientists and now artificial
intelligence has come into the sector
with the integration of Internet of
Things. Now days this system is
mostly used for identification of
various types of vehicles. These
systems were previously used by
government officials to identify
various criminals.
This system uses basic principle like
Image Reading, Image Conversion,
Image Resizing, Image Filters like
(erode, fill, dilation), Image Morphing
Procedure:
and Image Edge Detection (Sobel Image Reading:
Feldman Operator), Image
Comparison, Template Reading, We input the raw image which is
Image Processing. actually an RGB image (analog input)
which is considered for conversion.
This system is 60%-70% accurate.

2
Gray Code Conversion: License Plate Detection:
This RGB image is converted to Gray This step is the most important step in
Scale code which is again binarized to the detection of this system and
8-bit Gray code. algorithm which is based on the belief
that license plates are rectangular in
shape so mathematical morphology is
used for detecting the region of the car
where the number plate is fixed and no
other area gets highlighted due to this.
Now by using the Sobel Feldman
Operator we are using which
highlights the edge area using high
edge variance formula.

Filtering:
After conversion the image is filtered
using paper and salt noise reduction
which consists of eroding, filling and
dilating. The corresponding 3*3 masks
get eight neighbouring values.
Segmentation:
This step is again the next most
important step of where the license
plate is segmented using the character
detection technique which is mainly
given by their vertical projection.

3
Character Recognition: Display Output:
This step we compare different Then each output is displayed and each
characters which are usually step is shown which renders and reads
combinations of Numbers and and then finally displays the
Alphabets of varying length. These characters.
characters are compared using the
database of templates given by the use
of unique indexes. Which are
numbered so as to compare the no. of
end points.

Code:-
Plate_detection.m
close all;
clear all;

im = imread('Number Plate Images/image3.png');


im = imresize(im, [480 NaN]);
subplot(3,3,1),imshow(im),title('Resized Image')
imgray = rgb2gray(im);
subplot(3,3,2),imshow(imgray),title('Gray scale Image')
imbin = imbinarize(imgray);
subplot(3,3,3),imshow(imbin),title('Binary Image')
im = edge(imgray, 'sobel');
subplot(3,3,4),imshow(im),title('Edge Detection')
im = imdilate(im, strel('diamond', 2));
subplot(3,3,5),imshow(im),title('Dilated Image')
im = imfill(im, 'holes');
subplot(3,3,6),imshow(im),title('After filling holes')
im = imerode(im, strel('diamond', 10));
subplot(3,3,7),imshow(im),title('Eroded Image')

4
jufgdhgigdfj
Iprops=regionprops(im,'BoundingBox','Area', 'Image');
area = Iprops.Area;
count = numel(Iprops);
maxa= area;
boundingBox = Iprops.BoundingBox;

for i=1:count
if maxa<Iprops(i).Area
maxa=Iprops(i).Area;
boundingBox=Iprops(i).BoundingBox;
end
end
im = imcrop(imbin, boundingBox);
im = imresize(im, [240 NaN]);
im = imopen(im, strel('rectangle', [4 4]));
im = bwareaopen(~im, 500);
[h, w] = size(im);
subplot(3,3,8),imshow(im),title('Resize the Bounded Box')

imshow(im);

Iprops=regionprops(im,'BoundingBox','Area', 'Image');
count = numel(Iprops);
noPlate=[];

for i=1:count
ow = length(Iprops(i).Image(1,:));
oh = length(Iprops(i).Image(:,1));
if ow<(h/2) && oh>(h/3)
letter=Letter_detection(Iprops(i).Image);
noPlate=[noPlate letter]
end
end

5
Letter_detection.m
function letter=readLetter(snap)
load NewTemplates
snap=imresize(snap,[42 24]);
rec=[ ];

for n=1:length(NewTemplates)
cor=corr2(NewTemplates{1,n},snap);
rec=[rec cor];
end

ind=find(rec==max(rec));
display(ind);

.
if ind==1 || ind==2
letter='A';
elseif ind==3 || ind==4
letter='B';
elseif ind==5
letter='C';
elseif ind==6 || ind==7
letter='D';
elseif ind==8
letter='E';
elseif ind==9
letter='F';
elseif ind==10
letter='G';
elseif ind==11
letter='H';
elseif ind==12
letter='I';
elseif ind==13
letter='J';
elseif ind==14
letter='K';
elseif ind==15
letter='L';
elseif ind==16
letter='M';
elseif ind==17
letter='N';

6
elseif ind==18 || ind==19
letter='O';
elseif ind==20 || ind==21
letter='P';
elseif ind==22 || ind==23
letter='Q';
elseif ind==24 || ind==25
letter='R';
elseif ind==26
letter='S';
elseif ind==27
letter='T';
elseif ind==28
letter='U';
elseif ind==29
letter='V';
elseif ind==30
letter='W';
elseif ind==31
letter='X';
elseif ind==32
letter='Y';
elseif ind==33
letter='Z';
elseif ind==34
letter='1';
elseif ind==35
letter='2';
elseif ind==36
letter='3';
elseif ind==37 || ind==38
letter='4';
elseif ind==39
letter='5';
elseif ind==40 || ind==41 || ind==42
letter='6';
elseif ind==43
letter='7';
elseif ind==44 || ind==45
letter='8';
elseif ind==46 || ind==47 || ind==48
letter='9';
else
letter='0';
end
end

7
Template_detection.m
A=imread('alpha/A.bmp');B=imread('alpha/B.bmp');C=imread('alpha/C.bmp');
D=imread('alpha/D.bmp');E=imread('alpha/E.bmp');F=imread('alpha/F.bmp');
G=imread('alpha/G.bmp');H=imread('alpha/H.bmp');I=imread('alpha/I.bmp');
J=imread('alpha/J.bmp');K=imread('alpha/K.bmp');L=imread('alpha/L.bmp');
M=imread('alpha/M.bmp');N=imread('alpha/N.bmp');O=imread('alpha/O.bmp');
P=imread('alpha/P.bmp');Q=imread('alpha/Q.bmp');R=imread('alpha/R.bmp');
S=imread('alpha/S.bmp');T=imread('alpha/T.bmp');U=imread('alpha/U.bmp');
V=imread('alpha/V.bmp');W=imread('alpha/W.bmp');X=imread('alpha/X.bmp');
Y=imread('alpha/Y.bmp');Z=imread('alpha/Z.bmp');

one=imread('alpha/1.bmp');two=imread('alpha/2.bmp');
three=imread('alpha/3.bmp');four=imread('alpha/4.bmp');
five=imread('alpha/5.bmp'); six=imread('alpha/6.bmp');
seven=imread('alpha/7.bmp');eight=imread('alpha/8.bmp');
nine=imread('alpha/9.bmp'); zero=imread('alpha/0.bmp');

letter=[A B C D E F G H I J K L M N O P Q R S T U V W X Y Z];
number=[one two three four five six seven eight nine zero];

NewTemplates=[letter number];
save ('NewTemplates','NewTemplates')
clear all

8
RESULT:

9
Application of Automatic Law Enforcement
Number Plate Recognition
Automatic number plate recognition is
Automatic Number Plate Recognition an ideal technology to be used for law
has a wide range of applications since enforcement purposes. It is able to
the license number is the primary, most automatically identify stolen cars
widely /accepted, human readable, based on the up-to date blacklist. Other
mandatory identifier of motor very common law enforcement
vehicles. applications are red-light enforcement
and overspeed charging and bus lane
It provides automated access of the control.
content of the number plate for
computer systems managing databases Toll enforcement
and processing information of vehicle
movements. It provide commuters with an efficient
and time saving opportunity, ANPR is
Parking used at tolling stations in a wide range
of countries as a method of validating
One of the main applications of ANPR vehicle types and payment. Rather
is parking automation and parking than waiting in queues or worrying
security: ticketless parking fee about the correct change, ANPR
management, parking access systems have been set up to capture
automation, vehicle location guidance, number/license plates of those passing
car theft prevention, "lost ticket" fraud, through the toll plaza, allowing drivers
fraud by changing tickets, simplified, to go online or ring later and pay the
partially or fully automated payment toll fee rather than having to stop with
process, amongst many others. cash.

10
CONCLUSION REFERENCES
The results are as expected but not to o Qadri, Muhammad Tahir, and
up to the mark. The time of Muhammad Asif. "Automatic
compilation and processing is varying number plate recognition system
depending on the size of image and the for vehicle identification using
resize function. Around 12 images optical character recognition."
have been tested by us at different Education Technology and
angles but even if we increase the Computer, 2009. ICETC'09.
range of resize function it is detecting International Conference on.
only of the characters. We were able to IEEE, 2009
find out that bigger images which have
other vehicles or writings in o Kurdi, Moustafa M., et al.
background could not be processed "Lebanese automated number
correctly. We weren’t able to do plate reading based on neural
extrapolation and interpolation. More network recognition." Computer
changes can be executed done on this Engineering Conference
model. A GUI based software can be (ICENCO), 2017 13th
developed using more complex code International. IEEE, 2017.
and the existing algorithm.

o Panahi, Rahim, and Iman


Gholampour. "Accurate detection
and recognition of dirty vehicle
plate numbers for high-speed
applications." IEEE Transactions
on intelligent transportation
systems 18.4 (2017): 767-779.

11

You might also like