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

1 view (last 30 days)
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!

Accepted Answer

Image Analyst
Image Analyst on 6 Feb 2013
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.

More Answers (0)

Categories

Find more on Biomedical Imaging in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!