correlation coefficient of two images

조회 수: 96 (최근 30일)
geetha senthil
geetha senthil 2019년 11월 13일
댓글: Ranjit Shrestha 2022년 1월 31일
hai
I need to calculate the correlation coefficient(scalar value) of two images A and B of same size.I tried the below mentioned code but it is not working .
A=imread('input.tif');
B=imread('output.tif');
cc=corr2(A,B)
Can anybody help please..
  댓글 수: 1
Simon Silge
Simon Silge 2019년 11월 13일
편집: Simon Silge 2019년 11월 13일
Hello!
What exactly is not working? Do you get an error? What does it say?
You can try the example from the documentation: https://de.mathworks.com/help/images/ref/corr2.html
Does that work? Then maybe your images cause the problem.
Regards,
Simon

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

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 11월 13일
편집: KALYAN ACHARJYA 2019년 11월 13일
I have tested it with my sample images, there is no issue
A=imread('11.png'); % Read any Gray Image
[r,c,ch]=size(A); % Check sizes
B=imresize(rgb2gray(imread('13.png')),[r c]); % Read RGB>>GRAY>>Resize
cc=corr2(A,B)
12345.png
I answered similar questions here earlier.
If still, it is not solved, please do attach those two images.
Hope it helps!
  댓글 수: 1
Ranjit Shrestha
Ranjit Shrestha 2022년 1월 31일
What if we have more than two images? I mean a sequence of images.

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

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by