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 Center および File ExchangeBiomedical Imaging についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by