is there have any method to do the binary image matching??

4 次查看(过去 30 天)
is there have any method to do the matching for two binary image? my concept is using the for loop and counter , "if white color && white color ,counter ==1; if white color && black color ,counter == 0"
i have concept, but any one know how to write the this code in matlab ??

回答(2 个)

Image Analyst
Image Analyst 2012-1-31
How about (untested)
counter = sum(sum(bitand(A,B)));
or something like that?
  1 个评论
lingru celine
lingru celine 2012-2-1
does "for loop"can do this kind of matching?
may i know detail about "counter = sum(sum(bitand(A,B)));"?? thanks

请先登录,再进行评论。


Walter Roberson
Walter Roberson 2012-2-1
sum(A(:) == B(:))
or
sum(sum(A == B))
  2 个评论
lingru celine
lingru celine 2012-2-1
can i have the detail coding for binary image matching?? thanks
Walter Roberson
Walter Roberson 2012-2-1
That _is_ the detail coding except for the reading of the images.
Either of those expressions does the complete looping over the entire matrix adding 1 for each matching position.
So now you have the match counts. Now what?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by