DSP Batch 4 PBL
DSP Batch 4 PBL
BACHELOR OF TECHNOLOGY
In
ELECTRONICS AND COMMUNICATION ENGINEERING
Submitted by
G. NIKHILESWAR - 21331A0448
G. CHAITANYA - 21331A0449
ECE
1|Page
CONTENTS
TITLE PAGE
NO ABSTRACT Error! Bookmark not defined.
INTRODUCTION 4
METHODOLOGY 4
SOURCE CODE 5
REULTS 6
RESULT ANALYSIS 7
APPLICATIONS 7
DISADVANTAGES 8
CONCLUSION 9
REFERENCES 9
2|Page
ABSTRACT:
The proposed system consists of several stages, starting with image acquisition
from cameras installed at strategic locations. Preprocessing techniques such as
noise reduction, contrast enhancement, and image resizing are applied to improve
the quality of the acquired images. Following preprocessing, a series of image
processing algorithms are employed to isolate and extract the number plate region
from the acquired images.
The core of the system lies in the number plate detection algorithm, which utilizes
various techniques such as edge detection, morphological operations, and contour
analysis to accurately locate the number plate within the image. Once the number
plate region is identified, character segmentation techniques are employed to
isolate individual characters present on the plate.
3|Page
thereby contributing to improved road safety, traffic flow, and law enforcement
efforts.
INTRODUCTION:
METHODOLOGY:
The process includes processing the image. First the target image is get affected
with the binary filter which darkens the blacks and lightens the whites. Later it
get followed few more filters to remove the background objects into dark.
Now the number plate is clearly visible and it get cropped the potion need to be
know. The part is in black and white form.
The binary images are assigned with respected characters. Now the crop image
get compared with these 36 samples if any match get found the letter get printed
and the process continues till the last pixels. And the number is detected The
samples images :
4|Page
SOFTWARE USED :
1)MATLAB SOFTWARE
SOURCE CODE:
[path file] = uigetfile('/MATLAB Drive/test2.jpg','Select Image');
img = imread(fullfile(file,path)); figure; imshow(img);
title('Original Image'); img2 = rgb2gray(img);
imgX = edge(img2,'sobel','horizontal');
imgY = edge(img2,'sobel','vertical');
img3 = imgX|imgY; img3 = bwareaopen(img3, 700);
se = strel('line',2,90); img3 =
imdilate(img3,se); se = strel('line',2,0); img3
= imdilate(img3,se); img4 =
imfill(img3,'holes'); img4 =
bwmorph(img4,'thin',1); se = strel('line',5,90);
img5 = imerode(img4,se); img5 =
imerode(img5,se); img6 = immultiply(img2,img5);
verticalProfile = sum(img6, 2); row1 =
find(verticalProfile, 1, 'first'); row2 =
find(verticalProfile, 1, 'last');
horizontalProfile = sum(img6, 1); column1 =
find(horizontalProfile, 1, 'first'); column2 =
find(horizontalProfile, 1, 'last'); img7 =
img6(row1-1:row2+1, column1-1:column2+1); img7 =
~im2bw(img7); figure; imshow(img7);
title('Detected Number Plate');
imgProp = regionprops(img7,'BoundingBox','Image');
x=1; im0=imread('0.bmp'); im1=imread('1.bmp');
im2=imread('2.bmp'); im3=imread('3.bmp');
im4=imread('4.bmp'); im5=imread('5.bmp');
im6=imread('6.bmp'); im7=imread('7.bmp');
im8=imread('8.bmp'); im9=imread('9.bmp');
imA=imread('A.bmp'); imB=imread('B.bmp');
imC=imread('C.bmp'); imD=imread('D.bmp');
imE=imread('E.bmp'); imF=imread('F.bmp');
imG=imread('G.bmp'); imH=imread('H.bmp');
imI=imread('I.bmp');
imJ=imread('J.bmp');
imK=imread('K.bmp');
imL=imread('L.bmp');
imM=imread('M.bmp');
imN=imread('N.bmp');
imO=imread('O.bmp');
imP=imread('P.bmp');
imQ=imread('Q.bmp');
imR=imread('R.bmp');
imS=imread('S.bmp');
imT=imread('T.bmp');
imU=imread('U.bmp');
imV=imread('V.bmp');
imW=imread('W.bmp');
imX=imread('X.bmp');
imY=imread('Y.bmp');
imZ=imread('Z.bmp'); cnt=0;
out=''; for i = 1 :
5|Page
size(imgProp) this =
imgProp(i).BoundingBox;
if(this(3)>=15 &&this(4)>=30 && this(3)<=80 &&this(4)<=160)
temp = ~imgProp(i).Image; temp=imresize(temp,[40,20]);
imwrite(temp,'temp.bmp'); imgTest =imread('temp.bmp'); img
= imabsdiff(imA,imgTest);
rectangle('position',this,'EdgeColor','r'); minDiff =
sum(img(:)); cnt=cnt+1; ch = 'A';
if cnt==1 || cnt==2 || cnt==6 || cnt==5
img = imabsdiff(imB,imgTest);
if(sum(img(:))<minDiff) minDiff=
sum(img(:)); ch='B'; end img =
imabsdiff(imC,imgTest);
if(sum(img(:))<minDiff) minDiff=
sum(img(:)); ch='C'; end img =
imabsdiff(imD,imgTest);
if(sum(img(:))<minDiff) minDiff=
sum(img(:)); ch='D'; end img =
imabsdiff(imE,imgTest);
if(sum(img(:))<minDiff) minDiff=
sum(img(:)); ch='E'; end
img = imabsdiff(imF,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='F';
end img =
imabsdiff(imG,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='G';
end img =
imabsdiff(imH,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='H';
end img =
imabsdiff(imI,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='I';
end img =
imabsdiff(imJ,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='J';
end img =
imabsdiff(imK,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='K';
end img =
imabsdiff(imL,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='L';
end img =
imabsdiff(imM,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='M';
end img =
imabsdiff(imN,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='N';
end img =
imabsdiff(imO,imgTest);
if(sum(img(:))<minDiff)
6|Page
minDiff= sum(img(:)); ch='O';
end img =
imabsdiff(imP,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='P';
end img =
imabsdiff(imQ,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='Q';
end img =
imabsdiff(imR,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='R';
end img =
imabsdiff(imS,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='S';
end img =
imabsdiff(imT,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='T';
end img =
imabsdiff(imU,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='U';
end img =
imabsdiff(imV,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='V';
end img =
imabsdiff(imW,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='W';
end img =
imabsdiff(imX,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='X';
end img =
imabsdiff(imY,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='Y';
end img =
imabsdiff(imZ,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='Z';
end else img =
imabsdiff(im0,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='0';
end img =
imabsdiff(im1,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='1';
end img =
imabsdiff(im2,imgTest);
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='2';
end img =
imabsdiff(im3,imgTest);
7|Page
if(sum(img(:))<minDiff)
minDiff= sum(img(:)); ch='3';
end img = imabsdiff(im4,imgTest);
if(sum(img(:))<minDiff) minDiff= sum(img(:)); ch='4';
end img = imabsdiff(im5,imgTest);
if(sum(img(:))<minDiff) minDiff= sum(img(:)); ch='5';
end img = imabsdiff(im6,imgTest);
if(sum(img(:))<minDiff) minDiff= sum(img(:)); ch='6';
end img = imabsdiff(im7,imgTest);
if(sum(img(:))<minDiff) minDiff= sum(img(:)); ch='7';
end img = imabsdiff(im8,imgTest);
if(sum(img(:))<minDiff) minDiff= sum(img(:)); ch='8';
end img = imabsdiff(im9,imgTest);
if(sum(img(:))<minDiff) minDiff= sum(img(:)); ch='9';
end end out=strcat(out,ch); end end
msgbox(strcat('Vehicle Registraction Number :',out));
RESULTS:
Input image:
Output :
8|Page
Result Analysis:
For the given respected test images of vehicles , the original vehicle number is
recognized and printed on the screen .The same procedure is tested for multiple
samples of images and the results are verified .
DRAW BACKS:
1) It unable to recognized in blurry and noisy images
2) The data should be manually recorded
3) spaces pictures need to be given as input
Applications:
1. Traffic Monitoring Systems
2. Toll Collection Systems
3. Parking Management Systems
4. Law Enforcement for Traffic Violations
5. Vehicle Access Control in Restricted Areas
6. Automated Vehicle Identification in Highways
7. Stolen Vehicle Detection and Recovery
8. Electronic Road Pricing Systems
9. Border Security and Customs Enforcement
10. Automated Vehicle Registration and Tracking convert
Disadvantages:
1. Environmental Challenges
2. Inaccurate Detection in Challenging Conditions
3. Dependency on Quality of Captured Images
4. Vulnerability to Manipulation and Forgery
5. High Initial Setup Costs
6. Maintenance and Calibration Requirements
7. Legal and Privacy Concerns
8. Limited Performance in Complex Traffic Scenarios
9. Integration Challenges with Existing Systems 10. Potential for System
Downtime and Technical Issues
9|Page
Conclusion:
1. https://www.electronicsforu.com/electronics-projects/hardware-diy/vehicle-
numberplate-detection-using-matlab
2. https://www.mathworks.com/matlabcentral/fileexchange/54456-licence-
platerecognition
3. https://github.com/topics/vehicle-numberplate-recognition?l=matlab
10 | P a g e