Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 中选择像素的 4 个邻居matlab?
matlab
谢谢。
如果图像是img并且当前像素索引是i和j,那么四个邻居将是:
img
i
j
img(i-1,j); img(i+1,j); img(i,j-1); img(i,j+1);