Fit polyshape to objects in image
Version 1.0.3 (29,7 KB) von
Matt J
Given a 2D binary or label image of a number of objects, returns a "best-fit" polyshape to the boundaries of the objects.
The routine bwlpolyshape() in this submission, takes as input an image containing a number of objects. The routine returns, for each object, a polyshape representing the code's idea of a minimal, best-fitting polygon to the objects' boundaries.
The input image can be a binary image, in which case each contiguous region represents an object:
subplot(1,2,1); imshow(BW,[]);
subplot(1,2,2); pgons=bwlpolyshape(BW, Visualize=true)
For images containing discontinuous objects, a label map can be used:
Zitieren als
Matt J (2025). Fit polyshape to objects in image (https://de.mathworks.com/matlabcentral/fileexchange/181422-fit-polyshape-to-objects-in-image), MATLAB Central File Exchange. Abgerufen.
Kompatibilität der MATLAB-Version
Erstellt mit
R2024b
Kompatibel mit R2016b und späteren Versionen
Plattform-Kompatibilität
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Live Editor erkunden
Erstellen Sie Skripte mit Code, Ausgabe und formatiertem Text in einem einzigen ausführbaren Dokument.
| Version | Veröffentlicht | Versionshinweise | |
|---|---|---|---|
| 1.0.3 | Updated help doc |
||
| 1.0.2 | *Adjust figures |
||
| 1.0.1 | *Description update |
||
| 1.0.0 |
