Matlab code for matching two images

조회 수: 4 (최근 30일)
Karan Ratnaparkhi
Karan Ratnaparkhi 2011년 4월 24일
댓글: Image Analyst 2019년 11월 15일
Hey guys I need a matlab code to check if two images are matching or not? I tried correlation but it is nt working. Please help me with the code or tell me if there is any such kind function in matlab!!
  댓글 수: 1
David Young
David Young 2011년 4월 24일
When do two images match? Do they have to be identical, or can there be some differences? In what way does correlation not work - do you get an error message, or is it that you are defining "matching" to mean something other than "highly correlated"?

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

답변 (3개)

Image Analyst
Image Analyst 2014년 8월 21일
편집: Image Analyst 2014년 8월 21일
matches = A == B;
percentMatch = 100 * sum(matches(:)) / numel(matches);
This is for grayscale images. If it's a color image, the formula needs to be modified slightly.

Mangesh
Mangesh 2014년 8월 21일
the question states that, if i have images i.e A and B,and if i convert these two images in matrix form, then the matrix will match or not? if matches, then ok. if not then in what percent A matches with B????? I have the same que.

Chandrika yadav
Chandrika yadav 2019년 11월 15일
matches = A == B;
percentMatch = 100 * sum(matches(:)) / numel(matches);
  댓글 수: 1
Image Analyst
Image Analyst 2019년 11월 15일
Yes, this is exactly my answer. Are you having trouble with it?

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

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by