フィルターのクリア

matrix correlation in different directions

1 回表示 (過去 30 日間)
Oded Scharf
Oded Scharf 2020 年 12 月 2 日
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

回答 (0 件)

カテゴリ

Help Center および File ExchangeOperating on Diagonal Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by