Effacer les filtres
Effacer les filtres

matrix correlation in different directions

1 vue (au cours des 30 derniers jours)
Oded Scharf
Oded Scharf le 2 Déc 2020
Hey,
I would like to write a function thats gets two matrices and a direction (x-axis (o degrees)\yaxis (90 degrees)\diagonal (45 degrees)) and calculates the correlation in that direction.
for example, if I have matrices A and B, then
C = direction_corr(A,B,angle)
will give the correlation between the rotated matrices. So 0 is the regular correlation and 45 will give:
C=[sum(A(end,1)*B(1,end)),sum(A(end-1:end,1:2).*B(1:2,end-1:end),'all')...]
the 0 and 90 cases are easy, but I'm not sure what to do about the diagonal case. If i use imrotate it interpolates pixels and give me a wrong result.
Thanks in advence,
Oded

Réponses (0)

Catégories

En savoir plus sur Operating on Diagonal Matrices dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by