how to find mean value of alternate pixels in diagonal direction

1 次查看(过去 30 天)
how to find mean value of alternate pixels in diagonal direction that is in 45 and 135 degree direction can anyone help me???

回答(1 个)

Sean de Wolski
Sean de Wolski 2012-4-26
x = magic(5);
xd = diag(x);
mean(xd(1:2:end))

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by