How to solve convolution problem in 2d cross correlation?

4 views (last 30 days)
I am trying to cross correlate in 2d (xcorr2) of two .mat files. The data is too big to attach in this question here which exceeds 5MB. The code is as follows-
load rf_predeform.mat;
load rf_postdeform.mat;
xcorrelation = xcorr2('rf_predeform','rf_postdeform');
figure, surf(xcorrelation), shading flat
The rf_predeform.mat is 4113*4001 double type data
The rf_postdeform.mat is 3838*4001 double type data
Now, when i ran the code there was an error shown in the command window which is-
Error in xcorr2 (line 26)
c = conv2(a, rot90(conj(b),2));
Error in xcorr2dcode (line 13)
xcorrelation = xcorr2('rf_predeform','rf_postdeform');
I can't understand problem. So how can resolve that problem.
  5 Comments
Ahamed Al Arifin
Ahamed Al Arifin on 4 Mar 2020
The data is too big to attach in this question here which exceeds 5MB
Vladimir Sovkov
Vladimir Sovkov on 4 Mar 2020
Why do you use the quotation marks in calling the function? If 'rf_predeform' and 'rf_postdeform' are the names of the variables loaded from your mat files, you should try:
xcorrelation = xcorr2(rf_predeform,rf_postdeform);

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!