Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

Synchronise ReferenceFrame in Unity and native HoloLens application

I want to integrate a c++ library into Unity to handle some Computer Vision task.

The object detection module generates a relative matrix from the camera to the real world object. Now I want to calculate a global position of the object (In the same coordinate system as Unity).
This is currently done by using the CoordinateSystem of the corresponding frame in which the object has been detected and a SpaticalStationaryFrameOfReference, which was generated at the start of our object detection modul:

Windows::Perception::Spatial::SpatialStationaryFrameOfReference^ m_referenceFrame = Windows::Perception::Spatial::SpatialLocator::GetDefault()->CreateStationaryFrameOfReferenceAtCurrentLocation();

The global position should be propagated to Unity to position a Hologram at the global position of the detected object.

This procedure has the problem, that the transformation of the camera corrdinate system to the global coordinate system has some offset and the Hologram is at a false position in the real world.

Does Unity also has some SpatialStationaryFrameOfReference which one could use for calculating the transformation? Or is there ans better way to calculate the transformation?

Sign In or Register to comment.