How to insert a disc and centered around the dot?
2 次查看(过去 30 天)
显示 更早的评论
Hi,
I have A = zeros(100,100) materix which I added a while pixel (dots) in this zeros materix randomly. I have also another disc materix as follows
disk = strel('disk', 10);
D = disk.Neighborhood;
what I want to do is insert the disc and centered around the pixel ( white pixel)
0 个评论
采纳的回答
Walter Roberson
2020-2-10
A(appropriate_row:appropriate_row+99, appropriate_column:appropriate_column+99) = ...
A(appropriate_row:appropriate_row+99, appropriate_column:appropriate_column+99) | D;
3 个评论
Walter Roberson
2020-2-10
The +99 should be +9
Protection needs to be added for the case that the location is near an edge.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Computer Vision with Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!