#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 投票

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 件のコメント

Chinmay M.D
Chinmay M.D 2021 年 5 月 5 日
Thank you so much kind sir, it has been really helpful !
DGM
DGM 2021 年 5 月 5 日
If that answer is satisfactory for your needs, please click 'Accept' so that the question gets put into the right category.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeImages についてさらに検索

製品

リリース

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