You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
code of Licenses Plate Recognition Using Template Matching Method
1 view (last 30 days)
Show older comments
code of Licenses Plate Recognition Using Template Matching Method
Answers (1)
Image Analyst
on 13 Aug 2016
Here's an example of using normxcorr2() to do template matching.
11 Comments
KABMNZ KABMNZ
on 13 Aug 2016
% I have this code but isn't cached the license plate
clc; clear all; close all;
a= imread('IMG_20160802_163140.jpg');
a = rgb2gray(a); a1=a; %figure(1) %imshow(a) a= double(a);
[row col]=size(a); display(size(a)); %code for sobel filter % ? that shud be asked y sobel filter and not any oder BW = edge(double(a),'sobel'); figure(1) imshow(BW) title('Sobel Final Gradient Image');
%code for vertical projection % not used for the project have kept it so that if required dont need to % search for the code again vp = sum(BW,2); %figure(2); %(plot(vp));
%code for horizontal projection hp = sum(BW,1); % if we neeed it later
% over here i locate the point with highest peak and its index ;) [ybm , indy ] = max(vp);
% closing image % closing aimage is basically to used so that all the points which form % white points together form the object %BW1 = BW; se = strel('rectangle',[3,8]); closeBW = imclose(BW,se); %figure(2); %imshow(closeBW);
% filling image % just fills the the boundary and removes the blocka fI = imfill(closeBW,'holes'); figure(2); imshow(fI);
%open image fO = imopen(fI,se); fO = imclearborder(fO,8); figure(3); imshow(fO);
figure; imshow(a1); pause(1); % trials to corp the detect plate ( remeber black =0) figure; %set(gcf, 'Position', get(0, 'ScreenSize'));
labeledImage = bwlabel(fO,8); originalImage =a1; %just copied
measure = regionprops(labeledImage, originalImage, 'all'); number = size(measure, 1);
display(number);
for k = 1 : number % Loop through all blobs. chk=1; % Find the bounding box of each blob. thisBoundingBox = measure(k).BoundingBox; % Get list of pixels in current blob. % Extract out this coin into it's own image. subImage = imcrop(a1, thisBoundingBox);
% over here i will do plate recognition from the samples i have
% for eg in the image test_003 i have got 22 samples :-/
% u can count n chk :P
%display(size(subImage)); after chking i set the limit to [30 100]
[x y]= size(subImage);
if(x >=25 && y >=100)
imshow(subImage);
imwrite(subImage,'image1.jpg');
break;
%ocr; need to replace the ocr code over here
% just call the ocr file giving tit the input of file
% image1.jpg
% after that as soon as u go in ocr.m file delete image1.jpg
% this is to maintain security of the file
%pause(1);
end
% ocr;
%pause(5);
% Display the image with informative caption.
%subplot(3, 4, k);
%imshow(subImage);
%caption = sprintf('Coin #%d\nDiameter = %.1f pixels\nArea = %d pixels', k, blobECD(k), blobMeasurements(k).Area);
%title(caption, 'FontSize', 14);
end
Image Analyst
on 13 Aug 2016
Edited: Image Analyst
on 13 Aug 2016
You did not include either your input image, or your desired output or output image. What is your question?
And read this link to properly format your code http://www.mathworks.com/matlabcentral/answers/13205#answer_18099 , or else attach it with the paper clip icon.
KABMNZ KABMNZ
on 13 Aug 2016
Edited: KABMNZ KABMNZ
on 13 Aug 2016
When I call the image of a car of this program does not derail the image plate But the outputs is second part of the picture
Image Analyst
on 13 Aug 2016
What is a picture? Nothing is attached. Did you click this icon:
You need to do that to insert your pictures.
Also, please define "derail" for me. For me, it means that a train comes off the tracks. I don't know how it applies to an "image plate".
KABMNZ KABMNZ
on 14 Aug 2016
I mean. When I call the image of a car in this program .The program does not catch the part of plate. But the outputs is second part of the picture.
Image Analyst
on 14 Aug 2016
No, since I didn't have the image I didn't bother. So you tried both the frame icon (like I explained), and the paper clip icon and neither one worked? That's sounds weird.
KABMNZ KABMNZ
on 14 Aug 2016
Can you give me a site on the internet which I can learn to write a code of Licenses Plate Recognition Using Template Matching Method. thanks for helping me ز
Image Analyst
on 14 Aug 2016
You will find all or most of the papers here: http://www.visionbib.com/bibliography/motion-f726.html#License%20Plate%20Recognition,%20Extraction,%20Analysis
See Also
Categories
Find more on Image Data Workflows in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)