Comparing images using morphological operations only

11 ビュー (過去 30 日間)
koks paul
koks paul 2017 年 12 月 22 日
コメント済み: Image Analyst 2017 年 12 月 23 日
I have to detect numbers on license plate through comparing them with the digits numbers images, only using morphology, but i get stuck after segmenting the digits and while comparing both images "9 from plate & 9 original image" ANDing gives me partially wrong answer
% max = -99999;
% bothTrue = IMG & One;
% NumPixels = sum(bothTrue(:));
% if NumPixels>max
% max=NumPixels;
% Digit=1;
% end
and getting the near "Extent area" fails also
min=100000;
A=sqrt((0.4913)^2-Anum^2); //this number i observed from the extent of image of digit"1"
if A<min
Digit=1;
min=A;
end
So is there someway to solve it using morph and logical operations only?
  2 件のコメント
Stephen23
Stephen23 2017 年 12 月 22 日
@koks paul: this is not twitter. I removed the ugly # characters from your tags, and separated them correctly using commas.
koks paul
koks paul 2017 年 12 月 22 日
編集済み: koks paul 2017 年 12 月 22 日
Thank you for making it look better, any help for the question itself?

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

回答 (2 件)

Walter Roberson
Walter Roberson 2017 年 12 月 22 日
No. The calculation
A=sqrt((0.4913)^2-Anum^2);
is not a morphological calculation.
Morphological operations transform one matrix to another matrix, but morphological operations never make decisions about what the input or output matrices mean. You always need a non-morophological operation to interpret the results of the transformation.
  2 件のコメント
koks paul
koks paul 2017 年 12 月 22 日
Ok, good. Now i need to compare the segmented number, with the 9 numbers to decide what's the digit i got. What shall i use?
Image Analyst
Image Analyst 2017 年 12 月 23 日

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


Image Analyst
Image Analyst 2017 年 12 月 22 日
I don't know how to do it using morphology (dilation, erosion, opening, and closing). You can do it using logical operations (and, or, exclusive or, not). Try using the Dice Sorensen coefficient (demo attached).
  1 件のコメント
koks paul
koks paul 2017 年 12 月 23 日
it's not so much what i want to do, but thanks anyways

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

Community Treasure Hunt

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

Start Hunting!

Translated by