#1)
maxa= area;
boundingBox = Iprops.BoundingBox;
for i=1:count
if maxa<Iprops(i).Area
maxa=Iprops(i).Area;
boundingBox=Iprops(i).BoundingBox;
end
end
#2)
noPlate=[]; % Initializing the variable of number plate string.
for i=1:count
ow = length(Iprops(i).Image(1,:));
oh = length(Iprops(i).Image(:,1));
if ow<(h/2) & oh>(h/3)
letter=readLetter(Iprops(i).Image); % Reading the letter corresponding the binary image 'N'.
figure; imshow(Iprops(i).Image);
noPlate=[noPlate letter]; % Appending every subsequent character in noPlate variable.
end
end
I've been looking into a project named "Car Plate Number Recognition system and I don't exactly get these pieces of code. Even a brief summary of these codes would be highly appreciated.
Please help, thanks.

 채택된 답변

DGM
DGM 2021년 5월 5일
1: This seems like a convoluted way of finding the maximum of all object areas. That whole thing can be replaced with
[maxa idx] = max([Iprops.Area]);
boundingBox = Iprops(idx).BoundingBox;
2: In this part of the code, the image of the plate has been segregated from the rest of the vehicle, and it's been reduced to 12 distinct objects. The code steps through each object, looking at its height and width. If the aspect ratio of the object is sensible, it assumes it's a character and tries to convert it. This is important, because not all objects in the plate image are characters.
for n=1:12
subplot(3,4,n)
imshow(1-Iprops(n).Image)
end
There are probably other regionprops that could have been used to do the same, but that's the concept.

댓글 수: 2

Thank you so much kind sir, it has been really helpful !
If that answer is satisfactory for your needs, please click 'Accept' so that the question gets put into the right category.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Images에 대해 자세히 알아보기

제품

릴리스

R2017a

질문:

2021년 5월 5일

댓글:

DGM
2021년 5월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by