使用Hololens 2获取目标图像的图像坐标

问题描述 投票:0回答:1

我想从 Hololens 2 中提取相对于相机坐标的图像。我们可以很容易地得到空间坐标。但我需要原始的相机坐标,并且不应用 Vuforia 库中的空间映射。

当跟踪目标时,我们得到坐标,它们与世界位置中的图像相关。我已经检查了库和部分执行,但无法找到他们将相机坐标应用于空间坐标转换的位置。

image tracking vuforia hololens
1个回答
0
投票

有关 Unity 的 Vuforia 空间参考系的信息可在此处获取 https://developer.vuforia.com/library/device-tracking/spatial-frame-reference 这里是本地人 https://developer.vuforia.com/library/device-tracking/spatial-frame-reference-native

要获取相机参考系中目标的姿势,您必须将从目标观察者获得的姿势(将点从世界坐标转换为目标坐标)与设备跟踪器姿势(将点从世界坐标转换为相机坐标)结合起来.

在本机代码中,人们会做这样的事情

// get the target pose
VuPoseInfo targetPoseInfo; 
vuObservationGetPoseInfo(observer, &targetPoseInfo);
    
// get the device tracker pose
VuRenderState renderState;
vuStateGetRenderState(state, &renderState);

// combine the device pose with the target pose
auto targetInCameraPose = vuMatrix44FMultiplyMatrix(renderState.viewMatrix, targetPoseInfo.pose);
© www.soinside.com 2019 - 2024. All rights reserved.