Convert Position Vectors to Vertices, and Vice Versa!

버전 1.0.0.1 (2.86 KB) 작성자: Brett Shoelson
A utility function to convert between rectangular position [x y w h] and vertices [x; y]
다운로드 수: 337
업데이트 날짜: 2016/9/1

라이선스 보기

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.

인용 양식

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. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2014b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.1

Updated license

1.0.0.0