# How can I made a correlation between two images of the same size?

449 views (last 30 days)
Biza Ferreira on 28 Jun 2016
Answered: Ranjit Shrestha on 31 Jan 2022
Hello, I have a small problem I wanted to build a table with the correlation of 10 images values all with the same size.

Muhammad Usman Saleem on 28 Jun 2016
it is very simple to find correlation between two images of same size.
if you mean correlation coefficient, you can program manually the function or use corr2 :
corr2(a,b); % returns a scalar
##### 1 CommentShowHide None
Anand Karnam on 4 Apr 2020
I got scalar as output too. But if-loop is giving an error. The output should be between 1 and 2.

Biza Ferreira on 29 Jun 2016
Edited: Biza Ferreira on 29 Jun 2016
can you help me to solve this correlation problem using the expression
I have a problem in implementing this with MATLAB
##### 1 CommentShowHide None
Muhammad Usman Saleem on 29 Jun 2016
I think it is formula for cross correlation? If yes matlab has created build in function cross2(x,y) for correlation. Read my answer above please

Ranjit Shrestha on 31 Jan 2022
what if we have more than two images? I mean a sequence of images.

### Categories

Find more on Correlation and Convolution in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!