rotationMatrixToVector
(권장되지 않음) 3차원 회전 행렬을 회전 벡터로 변환
rotationMatrixToVector
는 권장되지 않습니다. 대신 rotmat2vec3d
함수를 사용하십시오. 자세한 내용은 호환성 관련 고려 사항 항목을 참조하십시오.
설명
는 입력 3차원 회전 행렬에 대응하는 축-각도 회전 벡터를 반환합니다. 이 함수는 변환에 로드리게스 공식을 사용합니다.rotationVector
= rotationMatrixToVector(rotationMatrix
)
예제
회전 행렬을 회전 벡터로 변환하기
Z축 중심의 90도 회전을 나타내는 행렬을 만듭니다.
rotationMatrix = [0 1 0; -1 0 0; 0 0 1];
이에 상응하는 회전 벡터를 구합니다.
rotationVector = rotationMatrixToVector(rotationMatrix)
rotationVector = 1×3
0 0 1.5708
입력 인수
rotationMatrix
— 카메라의 회전
3×3 행렬
카메라의 회전으로, 3×3 행렬로 지정됩니다. estimateExtrinsics
함수를 사용하여 이 행렬을 얻을 수 있습니다.
출력 인수
rotationVector
— 회전 벡터
요소를 3개 가진 벡터
회전 벡터로, 요소를 3개 가진 벡터로 반환됩니다. 이 벡터는 3차원에서의 회전 축을 나타내며, 여기서 크기는 회전 각도(단위: 라디안)에 대응됩니다.
데이터형: single
| double
참고 문헌
[1] Trucco, Emanuele, and Alessandro Verri. Introductory Techniques for 3-D Computer Vision. Upper Saddle River, NJ: Prentice Hall, 1998.
확장 기능
C/C++ 코드 생성
MATLAB® Coder™를 사용하여 C 코드나 C++ 코드를 생성할 수 있습니다.
버전 내역
R2016a에 개발됨R2022b: 권장되지 않음
R2022b부터 대부분의 Computer Vision Toolbox™ 함수는 전위곱 규칙을 사용하여 기하 변환을 만들고 수행합니다. 그러나 rotationMatrixToVector
함수는 후위곱 규칙을 사용합니다. 현재로서는 rotationMatrixToVector
를 제거할 계획이 없지만 전위곱 규칙을 지원하는 rotmat2vec3d
함수로 전환하여 기하 변환 워크플로를 간소화할 수 있습니다. 자세한 내용은 Migrate Geometric Transformations to Premultiply Convention 항목을 참조하십시오.
코드를 업데이트하려면 다음을 수행하십시오.
함수 이름
rotationMatrixToVector
를rotmat2vec3d
로 변경합니다.회전 행렬을
rotationMatrixToVector
함수의rotationMatrix
인수의 전치로 지정합니다. 또는estimateExtrinsics
함수를 사용하고 반환된rigidtform3d
객체의R
속성을 쿼리하여 올바른 전위곱 형식의 회전 행렬을 얻을 수 있습니다.
다음 표는 코드를 업데이트하는 방법의 예를 보여줍니다.
권장되지 않는 사용법 | 권장되는 대체 방법 |
---|---|
이 예는 rotVectorOld = rotationMatrixToVector(rotMatrixOld) | 이 예는 rotMatrixNew = rotMatrixOld'; rotVectorNew = rotmat2vec2d(rotMatrixNew); |
이 예는 [rotMatrixOld,transVector] = extrinsics( ...
imagePoints,worldPoints,intrinsics);
rotVectorOld = rotationMatrixToVector(rotMatrixOld); | 이 예는 camExtrinsics = estimateExtrinsics( ...
imagePoints,worldPoints,intrinsics);
rotMatrixNew = camExtrinsics.R;
rotVectorNew = rotmat2vec2d(rotMatrixNew); |
MATLAB 명령
다음 MATLAB 명령에 해당하는 링크를 클릭했습니다.
명령을 실행하려면 MATLAB 명령 창에 입력하십시오. 웹 브라우저는 MATLAB 명령을 지원하지 않습니다.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)