correlation coefficient of two images

97 visualizaciones (últimos 30 días)
geetha senthil
geetha senthil el 13 de Nov. de 2019
Comentada: Ranjit Shrestha el 31 de En. de 2022
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 comentario
Simon Silge
Simon Silge el 13 de Nov. de 2019
Editada: Simon Silge el 13 de Nov. de 2019
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

Iniciar sesión para comentar.

Respuestas (1)

KALYAN ACHARJYA
KALYAN ACHARJYA el 13 de Nov. de 2019
Editada: KALYAN ACHARJYA el 13 de Nov. de 2019
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 comentario
Ranjit Shrestha
Ranjit Shrestha el 31 de En. de 2022
What if we have more than two images? I mean a sequence of images.

Iniciar sesión para comentar.

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by