License Plate Recognition - need help to improve code.. :)
이전 댓글 표시
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
답변 (2개)
Image Analyst
2013년 1월 28일
0 개 추천
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.
Matt Kindig
2013년 1월 28일
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);
카테고리
도움말 센터 및 File Exchange에서 Semantic Segmentation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!