Rearrange Binary regions based on centroids

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개)

카테고리

도움말 센터File Exchange에서 Computational Geometry에 대해 자세히 알아보기

질문:

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