# Finding the azimuth and elevation of a Euler angle orientation from the regionprops3 function

조회 수: 80 (최근 30일)
Tobias Wrammerfors 2023년 5월 3일
답변: Rijuta 2023년 5월 19일
I am trying to extract elevation angle information from a segmented 3D image volume using the regionprops3 function, and am somewhat lost in trying to convert the orientation angles into azimuth and elevation. At first I was under the impression that one could simply ignore the third angle and convert the first two using the phitheta2azel funtion, but this does not work with negative inputs.
For reference, the orientation output of regionprops3 is described as "Euler angles [2], returned as a 1-by-3 vector. The angles are based on the right-hand rule. regionprops3 interprets the angles by looking at the origin along the x-, y-, and z-axis representing roll, pitch, and yaw respectively. A positive angle represents a rotation in the counterclockwise direction. Rotation operations are not commutative so they must be applied in the correct order to have the intended effect."
Is there a simple way to convert this to azimuth and elevation angles?

댓글을 달려면 로그인하십시오.

### 답변 (1개)

Rijuta 2023년 5월 19일
Hi Tobias,
To convert the Euler angles obtained from the `regionprops3` function into azimuth and elevation angles, you can use the following steps:
1. Extract the roll, pitch, and yaw angles from the Euler angles vector obtained from `regionprops3`.
2. Convert the yaw angle to the azimuth angle. Since the yaw angle represents rotation around the z-axis, it can be directly used as the azimuth angle.
3. Convert the pitch angle to the elevation angle. However, note that the pitch angle obtained from `regionprops3` is defined as the rotation around the y-axis. To convert it to the elevation angle, you need to subtract it from 90 degrees.
I hope these steps resolve your query. For detailed information, refer to the documentation.

댓글을 달려면 로그인하십시오.

### 카테고리

Help CenterFile Exchange에서 Gravitation, Cosmology & Astrophysics에 대해 자세히 알아보기

R2023a

### Community Treasure Hunt

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

Start Hunting!

Translated by