mask2poly

版本 1.5.0.0 (6.2 KB) 作者: Nikolay S.
Finds a polygon enclosing the user defined mask. Inverse of poly2mask :).
2.7K 次下载
更新时间 2011/7/25

查看许可证

This functions goal is to find a polygon which enclosures a user supplied mask. It's a kind of a complementary of Matlab poly2mask function. The difference is that all contour points are returned- without missing points for linearly related points. In order to get a 100% complementary of poly2mask all points inside straight lines should be omitted. In my case I actually need all those points, as index of ROI.
Combining mask2poly with poly2mask the user can produce a mask from a contour (line with X and Y coordinates), and vise-versa.

引用格式

Nikolay S. (2025). mask2poly (https://www.mathworks.com/matlabcentral/fileexchange/32112-mask2poly), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2011a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Image Processing and Computer Vision 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.5.0.0

Minor change

1.4.0.0

---------------2011-07-25----------- Ordering points according to rule of "nearest point" (accurate but slow) added.

1.3.0.0

Minor changes, according to Daniel's remarks.

1.2.0.0

An option to reorder the points so it will define a CW contour. Now you can plot the contours with line connecting the dots, without getting crazy lines all over the mask. Enable the "flagCW".

1.1.0.0

- "Inner" and "Outer" options replaced isIndex option
- Diff based edges calculation replaced contour based calculation for "Inner" and "Outer" options, which resulted in ~x3 shorter run time.

1.0.0.0