【发布时间】:2020-04-27 12:32:11
【问题描述】:
我想更好地了解在 ARKit 的 ARCamera 转换中的相机坐标空间。In the documentation,它说
此变换为相机创建了一个相对于设备方向恒定的局部坐标空间。在相机空间中,当设备处于UIDeviceOrientation.landscapeRight 方向时,x 轴指向右侧——也就是说,x 轴始终指向设备的长轴,从前置摄像头指向 Home 按钮。 y 轴指向上方(相对于 UIDeviceOrientation.landscapeRight 方向),z 轴指向远离屏幕一侧的设备。
接着,the UIDeviceOrientation.landscapeRight documentation 说:
设备处于横向模式,设备保持直立, 左侧的主页按钮。
当我试图理解这一点时,"the x-axis points to the right when the device is in UIDeviceOrientation.landscapeRight orientation" 和 "that is, the x-axis always points along the long axis of the device, from the front-facing camera toward the Home button" 之间似乎存在冲突。前者在右边有 +x,而后者在左边有 +x。
这是我对"the x-axis points to the right when the device is in UIDeviceOrientation.landscapeRight orientation"的图片:
这就是我对"that is, the x-axis always points along the long axis of the device, from the front-facing camera toward the Home button"的看法:
感谢任何帮助,谢谢!
更新:它不会影响这个问题,但为了更清楚起见,我之所以问这个问题是因为我有兴趣从Core Location 获取 x、y 和 z 地磁数据值。在 Core Location 中,如果手机处于纵向模式,+x 是向右,+y 是向上,+z 是朝向用户。所以看起来 ARKit 的相机坐标系与 Core Location 中的相机坐标系不同。
【问题讨论】:
标签: ios swift transform augmented-reality arkit