Second-Order Difference

How can I find the Second-Order Difference signals in diagonal and minor diagonal of a matrix? The matrix is an image. For the horizontal and vertical I suppose this:
Dh = diff(image, 2);
Dv = diff(Image, 2 ,2);
Thanks!

回答 (1 件)

bym
bym 2011 年 9 月 24 日

0 投票

m = magic(4)
Dd = diff(diag(m),2) %diagonal
Dm = diff(diag(rot90(m)),2) %minor diagonal

2 件のコメント

Bruno Bertini
Bruno Bertini 2011 年 9 月 24 日
Thank you very much!
Dh and Dv are correct?
I have to use the Second-Order Difference signals for an image.
bym
bym 2011 年 9 月 24 日
Dh and Dv look correct. I have edited Dm to add the 2 ;)

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeImage Processing Toolbox についてさらに検索

質問済み:

2011 年 9 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by