I have a binary map, BW, and the Centroids for each region in BW. If I randomize the Centroids, how can I create another binary map with the same region shapes as BW but whose centers corresponds to the randomized Centroids?

 採用された回答

Image Analyst
Image Analyst 2014 年 10 月 31 日

0 投票

Get the blobs, use regionprops() to find their bounding box and then use indexing to extract out the bounding box as subimages. Then create a new, blank canvass (image) and paste the subimages in at random locations. See my copy and paste demo, attached.

その他の回答 (0 件)

質問済み:

2014 年 9 月 23 日

回答済み:

2014 年 10 月 31 日

Community Treasure Hunt

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

Start Hunting!

Translated by