Can I use diff function to subtract pixel from 2-pixel away from it? So it not neighbour pixel.
2 次查看(过去 30 天)
显示 更早的评论
Can I use diff function to subtract pixel from 2-pixel away from it? So it not neighbour pixel.
0 个评论
采纳的回答
Walter Roberson
2013-2-18
No.
I suggest you use
diff2_col = YourArray(:,3:end) - YourArray(:,1:end-2)
or
diff2_row = YourArray(3:end,:) - YourArray(1:end-2,:)
depending on which dimension you want to proceed across.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!