parking with licence plate recognition,,HELP

hello everyone,,i have been working on a project(automatic parking using number plate recognition algorithm,,license plate recognition algorithm based on Templates matching. The algorithm takes an input image of the number plate and after filtering the image, it performs region based operations. Then it tries to capture the characters regions in a processed binary image and with the aid of template matching outputs the string of number plate characters in text format,,,am currently done with the recognition and output part,,,am having some problems with the creation and connection of the database to the NPR code so as to compare the text output of the first part of the code and see whether the detected plate number is a registered customer or not..i will appreciate any help.THANK YOU

8 Comments

What kind of help do you want? Like telling you to click some of the links on the right? Or to see this link http://www.visionbib.com/bibliography/motion-f726.html#License%20Plate%20Recognition,%20Extraction,%20Analysis
thanks for the reply,,,,i want to create a database that i can use to compare the text output of the recognized plate number and have a final output that either says the car is customer or not
clc
close all;
clear;
load imgfildata;
[file,path]=uigetfile({'*.jpg;*.bmp;*.png;*.tif'},'Choose an image');
s=[path,file];
img=imread(s);
np=number_plate(img);
disp(np);
clc
close all;
clear;
load imgfildata;
[file,path]=uigetfile({'*.jpg;*.bmp;*.png;*.tif'},'Choose an image');
s=[path,file];
picture=imread(s);
[~,cc]=size(picture);
picture=imresize(picture,[300 500]);
if size(picture,3)==3
picture=rgb2gray(picture);
end
% se=strel('rectangle',[5,5]);
% a=imerode(picture,se);
% figure,imshow(a);
% b=imdilate(a,se);
threshold = graythresh(picture);
picture =~im2bw(picture,threshold);
picture = bwareaopen(picture,30);
imshow(picture)
if cc>2000
picture1=bwareaopen(picture,3500);
else
picture1=bwareaopen(picture,3000);
end
figure,imshow(picture1)
picture2=picture-picture1;
figure,imshow(picture2)
picture2=bwareaopen(picture2,200);
figure,imshow(picture2)
[L,Ne]=bwlabel(picture2);
propied=regionprops(L,'BoundingBox');
hold on
pause(1)
for n=1:size(propied,1)
rectangle('Position',propied(n).BoundingBox,'EdgeColor','g','LineWidth',2)
end
hold off
figure
final_output=[];
t=[];
for n=1:Ne
[r,c] = find(L==n);
n1=picture(min(r):max(r),min(c):max(c));
n1=imresize(n1,[42,24]);
imshow(n1)
pause(0.2)
x=[ ];
totalLetters=size(imgfile,2);
for k=1:totalLetters
y=corr2(imgfile{1,k},n1);
x=[x y];
end
t=[t max(x)];
if max(x)>.45
z=find(x==max(x));
out=cell2mat(imgfile(2,z));
final_output=[final_output out];
end
end
file = fopen('number_Plate.txt', 'wt');
fprintf(file,'%s\n',final_output);
fclose(file);
winopen('number_Plate.txt')
@abdiaziz abdullahi: Do you see that your code is not readable? Mark the code and press the "{} Code" button. This will increase your chance to get an answer.
clc
close all;
clear;
load imgfildata;
[file,path]=uigetfile({'*.jpg;*.bmp;*.png;*.tif'},'Choose an image');
s=[path,file];
img=imread(s);
np=number_plate(img);
disp(np);
NEXT PART STARTS HERE
clc
close all;
clear;
load imgfildata;
[file,path]=uigetfile({'*.jpg;*.bmp;*.png;*.tif'},'Choose an image');
s=[path,file];
picture=imread(s);
[~,cc]=size(picture);
picture=imresize(picture,[300 500]);
if size(picture,3)==3
picture=rgb2gray(picture);
end
% se=strel('rectangle',[5,5]);
% a=imerode(picture,se);
% figure,imshow(a);
% b=imdilate(a,se);
threshold = graythresh(picture);
picture =~im2bw(picture,threshold);
picture = bwareaopen(picture,30);
imshow(picture)
if cc>2000
picture1=bwareaopen(picture,3500);
else
picture1=bwareaopen(picture,3000);
end
figure,imshow(picture1)
picture2=picture-picture1;
figure,imshow(picture2)
picture2=bwareaopen(picture2,200);
figure,imshow(picture2)
[L,Ne]=bwlabel(picture2);
propied=regionprops(L,'BoundingBox');
hold on
pause(1)
for n=1:size(propied,1)
rectangle('Position',propied(n).BoundingBox,'EdgeColor','g','LineWidth',2)
end
hold off
figure
final_output=[];
t=[];
for n=1:Ne
[r,c] = find(L==n);
n1=picture(min(r):max(r),min(c):max(c));
n1=imresize(n1,[42,24]);
imshow(n1)
pause(0.2)
x=[ ];
totalLetters=size(imgfile,2);
for k=1:totalLetters
y=corr2(imgfile{1,k},n1);
x=[x y];
end
t=[t max(x)];
if max(x)>.45
z=find(x==max(x));
out=cell2mat(imgfile(2,z));
final_output=[final_output out];
end
end
file = fopen('number_Plate.txt', 'wt');
fprintf(file,'%s\n',final_output);
fclose(file);
winopen('number_Plate.txt')
Wow - there's no way we could have know how to help just from your original message. No way I would have guessed at this chunk of code. Anyway, did you try the Computer Vision System Toolbox? It can do OCR and find text in natural scenes. If not, why not? It would be hard for you to put in all the time and effort that they already have. Since they've done it, why not just buy it?
i cant buy it,,because this is the specific project that i want to do,,unless they are exactly the same,,,i saw this code for comparison from a another similar code...was thinking if i could do the same and how...
function G = comparison(ans)
Data = ['XJZ 7743';'OKW 4532';'JFZ 4056';'LLZ 2268';'JGF 3678';'DHQ 5491'];
A = char(ans);
B = cellstr(Data);
D = cellstr(A);
F = strcmp(D,B);
G = F(1)|F(2)|F(3)|F(4)|F(5)|F(6);
end

Sign in to comment.

Answers (2)

If I would have the same challenge, I would interface with an Industry Grade LPR / ANPR system which already deals with many countries' license plate formats and format / syntax changes with which you should cope with as well, instead of reinventing that wheel. Then you can concentrate on the parking management software, where just interfacing with a professional, open LPR / ANPR system would just ask for a small part of your development efforts.
Regards, Walter.
"i cant buy it,,because this is the specific project that i want to do"
So if you're not allowed to buy or otherwise use other people's software because you're supposed to do it yourself, then all I can suggest is http://www.mathworks.com/matlabcentral/answers/8026-best-way-s-to-master-matlab

Categories

Find more on Deep Learning Toolbox in Help Center and File Exchange

Asked:

on 11 Nov 2017

Answered:

on 15 Nov 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!