License Plate Recognition - need help to improve code.. :)
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello everybody. At start sorry for my English..:P I have code for LPR:
I = imread('tablice\4.jpg');
BW = im2bw(I,0.4);
% figure;imshow(BW)
se = strel('rectangle', [2 20]);
BW_opened = imclose(BW,se);
figure, imshow(BW_opened,[])
s=regionprops(BW_opened,'Area','BoundingBox');
[~,ii] = sort([s.Area],'descend');
out = imcrop(I,s(ii(2)).BoundingBox);
figure
imshow(out);
At this photo:
After compilation i have output image:
I want to have an output image of same license plate- with no other parts of car body and background.. If someone can help me and will improve my code ? I will be very grateful.
Regards
Michal
0 Kommentare
Antworten (2)
Image Analyst
am 28 Jan. 2013
That algorithm you have is way to simple to be of any real world use. But we don't do major algorithm development here. Look at section 16.7.2.5 on "License Plate Recognition, Extraction, Analysis" in Vision Bib to see how people do it successfully.
0 Kommentare
Matt Kindig
am 28 Jan. 2013
Hi Michal,
You might have more luck thresholding the three color planes (red, green, and blue) separately, rather than thresholding all three planes to the same level (0.4 in your code). I found some luck with this approach:
I = imread('https://dl.dropbox.com/u/19214852/7.jpg');
r = I(:,:,1); %red plane
g = I(:,:,2); %green plane
b = I(:,:,3); %blue plane
BW = (r >= 230) & (r <= 260) & (g >= 160) & (g <= 240) & (b >= 160) & (b <= 240);
s = regionprops(BW, 'Area', 'BoundingBox');
[~, ii] = sort([s.Area], 'descend');
out = imcrop(I, s(ii(1)).BoundingBox);
imshow(out);
0 Kommentare
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!