microsoft / HoloLensForCV

Sample code and documentation for using the Microsoft HoloLens for Computer Vision research
MIT License
475 stars 154 forks source link

How can I know precisely where HoloLens is in 6DoF space #75

Open TooSchoolForCool opened 5 years ago

TooSchoolForCool commented 5 years ago

I went through a HoloLens research mode tutorial where it says that "the application can know precisely where HoloLens is in 6DoF space at each sensor frame capture time."

I was wondering if such function is already provided in Hololens, or we have to develop our own solution with the help of research mode sensor streams.

Here is the link to the tutorial, https://docs.microsoft.com/en-us/windows/mixed-reality/research-mode#using-sensor-data-in-your-apps

ahojnnes commented 5 years ago

Please, have a look at the sample applications on Github that use the research mode API of HoloLens: https://github.com/Microsoft/HoloLensForCV/. Hope this answers your question.

TooSchoolForCool commented 5 years ago

Thank you so much, Johannes. I really appreciate your reply.

I went through this tutorial in which it uses C# and Unity.

I have several questions,

  1. Is it possible to use the research mode sensor streams in C#? Is there any available related tutorials and documentations?
  2. How can I build/use the sample? I tried to run the SensorStreamViewer sample. Since there is no .sln file, how can I load the whole project into the Visual Studio 2017 and build it?

Again, thank you so much!

ahojnnes commented 5 years ago
  1. It should be possible to use the API from C# as well, but you would have to rebuild the entire set of convenience functions / wrappers in the HoloLensForCV project yourself. Otherwise, you could create an interop layer to the already existing C++ code.
  2. Open the HoloLensForCV solution and deploy the project to the HoloLens. For more information, have a look at the tutorials/ files.
FracturedShader commented 5 years ago

@TooSchoolForCool I made an application in Unity that takes the raw HoloLens data and then rebuilds the space in VR using discrete "scans". The only thing that absolutely must be done in C++ is the opaque HoloLensCameraIntrinsics structure, and its methods. Otherwise, almost everything has a direct C# counterpart.