Point cloud rendered only partially

白昼怎懂夜的黑 提交于 2019-12-24 13:34:10

问题


I only get a partial point cloud of the room. Other parts of the room do not get rendered at all. It only sees a part to the left. I am using the Point Cloud prefab in Unity. When I use one of the apps, such as Room Scanner or Explorer, I get the rest of the room. I intend to modify the pre-fab for my application but so far I get that limited view. I am using Unity 5.3.3 on Windows 10 on a 64.


回答1:


set the unity camera aligned with the depth camera frame so for the matrix dTuc dTuc = imuTd.inverse * imuTdepth * depthTuc

double timestamp = 0.0;
        TangoCoordinateFramePair pair;
        TangoPoseData poseData = new TangoPoseData();

        // Get the transformation of device frame with respect to IMU frame.
        pair.baseFrame = TangoEnums.TangoCoordinateFrameType.TANGO_COORDINATE_FRAME_IMU;
        pair.targetFrame = TangoEnums.TangoCoordinateFrameType.TANGO_COORDINATE_FRAME_DEVICE;
        PoseProvider.GetPoseAtTime(poseData, timestamp, pair);
        Matrix4x4 imuTd = poseData.ToMatrix4x4();

        // Get the transformation of IMU frame with respect to depth camera frame.
        pair.baseFrame = TangoEnums.TangoCoordinateFrameType.TANGO_COORDINATE_FRAME_IMU;
        pair.targetFrame = TangoEnums.TangoCoordinateFrameType.TANGO_COORDINATE_FRAME_CAMERA_DEPTH;
        PoseProvider.GetPoseAtTime(poseData, timestamp, pair);
        Matrix4x4 imuTdepth = poseData.ToMatrix4x4();

        // Get the transform of the Unity Camera frame with respect to the depth Camera frame.
        Matrix4x4 depthTuc = new Matrix4x4();
        depthTuc.SetColumn(0, new Vector4(1.0f, 0.0f, 0.0f, 0.0f));
        depthTuc.SetColumn(1, new Vector4(0.0f, -1.0f, 0.0f, 0.0f));
        depthTuc.SetColumn(2, new Vector4(0.0f, 0.0f, 1.0f, 0.0f));
        depthTuc.SetColumn(3, new Vector4(0.0f, 0.0f, 0.0f, 1.0f));

        m_dTuc = Matrix4x4.Inverse(imuTd) * imuTdepth * depthTuc;


来源:https://stackoverflow.com/questions/36240957/point-cloud-rendered-only-partially

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!