microsoft / HoloLensForCV

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

Access raw depth data from unity hololens project #20

Closed Upd4ting closed 6 years ago

Upd4ting commented 6 years ago

How can I do that?

Upd4ting commented 6 years ago

Any news?

davidgedye commented 6 years ago

Sorry for the delay. We have no plans at the moment to provide Unity access to any of these streams.

felixvh commented 6 years ago

Hi Upd4ting,

I found this website: http://akihiro-document.azurewebsites.net/post/hololens_researchmode2/

The person implented it in unity. I know its in Japanese but using google translate, you will figure out how to implement it !

Best felix

CaptainTimberTim commented 5 years ago

I figured out how to access the sensor streams through a Uniy app. Helpful was this Blog post: https://mtaulty.com/2018/04/06/experimenting-with-research-mode-and-sensor-streams-on-hololens-redstone-4-preview/ that kindof describes how to use the API (but he does not use Unity). The biggest problem was that "Access denied" error he also had and fixed in the post. But his fix didn't work for me. This Japanese blog post gave me the missing hints (I don't speak japanese, but the files are still english) http://akihiro-document.azurewebsites.net/post/hololens_researchmode2/ In short: you have to add the permission to your Package.appxmanifest file manually, after you build the app in unity . 1- xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" needs to go in the tag 2- add rescap to the "IgnorableNamespaces" tag also in 3- add in the tag listing (important: it should be BEFORE the entries.

The Git repo of the japanese guy is also helpful to get a first test going: https://github.com/akihiro0105/HoloLensResearchmodeDemo

Hope that helps those who are as clueless as I was ;)