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!

Respuestas (1)

bym
bym el 24 de Sept. de 2011

0 votos

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

2 comentarios

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

Iniciar sesión para comentar.

Categorías

Más información sobre Image Processing Toolbox en Centro de ayuda y File Exchange.

Preguntada:

el 23 de Sept. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by