2017-04-14 104 views
0

如果我从黑白图像获取像素位置为[row, column] = find(bw2 == 1);那么我想将此位置移动到RGB图像,然后如何移除此位置或将掩码替换为RGB图像中的此位置。这个怎么做?Matlab'图像处理'

+0

你想要什么来取代它? – Suever

+0

我想在把这个像素位置放在rgb图像上来填充这个区域与邻居 –

回答

1

您是否尝试过这样的事情

[row, column] = find(bw2 == 1); 

rgb_image(row,column) = 1; %assign value for the indices you found in your bw image; use 1 or whatever you want 

bw2(row,column) = NaN; %or any other value, so next mask you won't select these indices 
+0

谢谢亲爱的qbzenker –

+0

我希望它有帮助!如果它解决了你的问题,你可以在我的答案plz旁边打上复选标记! – qbzenker