How to find the 2-D correlation coefficient between the two images, each having same pixels?

I have to calculate the 2-D correlation coefficient between the images img1 and img2, each having same pixels. I am doing the following:
img1 = zeros(256);
img2 = ones(256); or you can take all white image
Corr_Coeff = corr2(img1, img2)
Output: NaN (??)

Respuestas (1)

KSSV
KSSV el 4 de Oct. de 2021
Editada: KSSV el 4 de Oct. de 2021
Read about ssim.
You can try:
R = regression(Img1(:),Img2(:)) ;

Productos

Versión

R2021a

Preguntada:

el 4 de Oct. de 2021

Comentada:

el 6 de Oct. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by