According to the ARKit document, i.e., ARCamera, I see there are 2 ways describing the orientation of the camera, camera.transform and eulerAngles. First, I transform the rotation matrix of frame.camera
to euler angles and then the outputs are not equal to eulerAngle
values.
Why? What is the difference between camera.transform
and eulerAngle
values in ARKit?
The details of the transformation are described as follows.
Use the function in Eigen library to obtain the euler angles, Rx.eulerAngles(0, 1, 2)
, where Rx
is the rotation matrix of frame.camera.transform
.
For example:
frame.camera.transform:
Rx =
[ -0.0443775, -0.900017, 0.433589;
0.998663, -0.0284454, 0.043167;
-0.0265174, 0.434925, 0.900076; ]
The outputs of Rx.eulerAngles(0, 1, 2)
are [ 3.09367, 2.69312, -1.52153]
eulerAngle
values are [ -0.449955, -0.0294528, -1.60239]