Is there any way to avoid overlapping of randomly placed gaussian spots on an image?

1 次查看(过去 30 天)
I am writing a super resolution simulation to analyze microscopy images. I am adding a large number of randomly placed gaussian spots that are 5x5 pixels large onto a 512x512 pixel image.Is there any way to avoid overlapping of the randomly placed gaussian spots on an image? I am randomly generating the cooridinates for the center pixel of the spot using
r1 = randi(ArraySizeX-6,1,1)+3; r2 = randi(ArraySizeY-6,1,1)+3;
Any help would be appreciated.
Thanks!

采纳的回答

Image Analyst
Image Analyst 2013-2-6
Yes. Just keep a binary image of where you're plopping down the 5x5 image template. When it comes time to lay down the next one, just examine the pixels where it would go and see if any of them are true.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Biomedical Imaging 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by