Find vertices in image of convex polygon
The command pgonCorners() implemented in this FEX submission takes a binary image of a convex polygon as input and returns estimated locations of its vertices (to the nearest pixel) as output. Prior knowledge of the number of vertices is assumed. The method used is based on an idea from linear programming discussed in this Matlab Answers post,
Although the method was designed with convex polygons in mind, it sometimes works rather well on approximately convex objects, as demonstrated in example scripts contained in this submission and illustrated in the thumbnail image above.
SYNTAX:
corners = pgonCorners(BW,k)
corners = pgonCorners(BW,k,N)
IN:
BW: Input binary image.
k: Number of vertices to search for.
N: Number of angular samples partitioning the unit circle (default=360).
Affects the resolution of the search.
OUT:
corners: Detected corners in counter-clockwise order as a k x 2 matrix.
Cita come
Matt J (2024). Find vertices in image of convex polygon (https://www.mathworks.com/matlabcentral/fileexchange/74181-find-vertices-in-image-of-convex-polygon), MATLAB Central File Exchange. Recuperato .
Compatibilità della release di MATLAB
Compatibilità della piattaforma
Windows macOS LinuxCategorie
- Image Processing and Computer Vision > Image Processing Toolbox > Geometric Transformation and Image Registration >
Tag
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Scopri Live Editor
Crea script con codice, output e testo formattato in un unico documento eseguibile.
Versione | Pubblicato | Note della release | |
---|---|---|---|
1.0.0 |