Generate ROI from a binary mask

7 ビュー (過去 30 日間)
Zeyi Yang
Zeyi Yang 2021 年 8 月 19 日
コメント済み: Zeyi Yang 2021 年 8 月 19 日
Hi all,
I am looking for a way to generate ROI objects from a binary mask that contains a single object.
The idea is to transform a DCNN model predicted binary mask into an interactive ROI object which one can then edit. I have already processed the predicted mask so that I will have several binary masks that contains a single object (or equivalently, a single instance mask).
I know it is possible to programmatically draw ROI objects by defining the roi.ROI_TYPE.Position property, for instance,
drawpolygon(imageAxes, 'Position', roiCoordinates);
I am wondering if someone has successfully converted binary masks to ROI coordinates? Or perhaps theres another way to generate a ROI object from a binary image?
Any suggestions would help.
Cheers
  2 件のコメント
Marcel Kreuzberg
Marcel Kreuzberg 2021 年 8 月 19 日
check bwboundaries
regards
Zeyi Yang
Zeyi Yang 2021 年 8 月 19 日
Thank you Marcel!
"bwboundaries" worked indeed! The coordinates generated by "bwboundaries" was flipped about the Y-axis but this problem was easily solved with the built-in function "flip". Here's an example of the generated Freehand ROI objects:

サインインしてコメントする。

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by