How to solve convolution problem in 2d cross correlation?

조회 수: 8 (최근 30일)
Ahamed Al Arifin
Ahamed Al Arifin 2020년 3월 4일
댓글: Vladimir Sovkov 2020년 3월 4일
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
Ahamed Al Arifin
Ahamed Al Arifin 2020년 3월 4일
The data is too big to attach in this question here which exceeds 5MB
Vladimir Sovkov
Vladimir Sovkov 2020년 3월 4일
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);

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by