Borrar filtros
Borrar filtros

matrix correlation in different directions

1 visualización (últimos 30 días)
Oded Scharf
Oded Scharf el 2 de Dic. de 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

Respuestas (0)

Categorías

Más información sobre Operating on Diagonal Matrices en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by