Rearrange Binary regions based on centroids

3 ビュー (過去 30 日間)
John
John 2014 年 9 月 23 日
回答済み: Image Analyst 2014 年 10 月 31 日
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 日
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 件)

カテゴリ

Help Center および File ExchangeMathematics and Optimization についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by