Normalized cross correlation of matrices along specified dimensions

2 views (last 30 days)
I need a function that computes the normalized cross correlation along every column/row of a matrix with the corresponding column/row of another matrix
I could do:
for i = 1 : size( A , 2 )
x(:,i) = normxcorr2( A(:,i) , B(:,i) )
end
but this runs very slowly for large matrices. I found the function fastConv.m on the file exchange which computes the convolution of two matrices along a particular dimension which could be used to find the cross correlation though not normalized.
I need to somehow combine fastConv with normxcorr2, but I cannot figure out how to adapt the code in normxcorr2 to get accurate normalization.
any help would be much appreciated.
thank you Sam

Answers (0)

Community Treasure Hunt

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

Start Hunting!