Convert Position Vectors to Vertices, and Vice Versa!

A utility function to convert between rectangular position [x y w h] and vertices [x; y]
337 descargas
Actualizado 1 sep 2016

Ver licencia

Many MATLAB and Toolbox functions require the specification of rectangular regions. Several use "position vectors," specified as [Xmin Ymin Width Height], many others require specification by vertex, [x; y]. For rectangular ROIs, either one defines the other. This submission facilitates easy conversion from position to vertex:
verts = posToVert(posn);
or from vertices to position:

posn = vertToPos(vert);

Simple, but useful.

Citar como

Brett Shoelson (2024). Convert Position Vectors to Vertices, and Vice Versa! (https://www.mathworks.com/matlabcentral/fileexchange/48728-convert-position-vectors-to-vertices-and-vice-versa), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2014b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Convert Image Type en Help Center y MATLAB Answers.

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.0.0.1

Updated license

1.0.0.0