How to solve convolution problem in 2d cross correlation?
Show older comments
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
Kaashyap Pappu
on 4 Mar 2020
What was the error statement?
Ahamed Al Arifin
on 4 Mar 2020
KALYAN ACHARJYA
on 4 Mar 2020
Can you attach thease two files rf_predeform.mat and rf_postdeform.mat?
Ahamed Al Arifin
on 4 Mar 2020
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);
Answers (0)
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!