petergu684 / HoloLens2-ResearchMode-Unity

Unity Plugin for using research mode functionality in HoloLens 2. Modified based on HoloLens2ForCV.
MIT License
202 stars 59 forks source link

Add LONG THROW depth Data to plugins and UnitySample #15

Closed HoloAdventure closed 3 years ago

HoloAdventure commented 3 years ago

I updated the plugin and UnitySample to get LONG THROW depth Data

I added the following API for LONG THROW depth Data to the plugin ・InitializeLongDepthSensor() ・StartLongDepthSensorLoop() ・LongDepthMapTextureUpdated() ・GetLongDepthMapBuffer() ・GetLongDepthMapTextureBuffer() ・GetLongDepthBufferSize()

I added drawing area for LONG THROW depth Data to UnitySample. And I added the function to get LONG THROW depth Data to ResearchModeVideoStream.cs. 57_a 68_a

4

The plugin in UnitySample has been replaced with the plugin of LONG THROW depth Data. Follow the Readme instructions to deploy to HoloLens2.

The conversion logic from LONG THROW depth Data to grayscale is based on the code of HoloLens2ForCV. Same as lines 266 to 307 of SlateCameraRenderer.cpp below. https://github.com/microsoft/HoloLens2ForCV/blob/main/Samples/SensorVisualization/SensorVisualization/Content/SlateCameraRenderer.cpp

I have a record of my work in the following article. https://bluebirdofoz.hatenablog.com/entry/2021/06/06/045311

Thank you for providing a great plugin. I needed LONG THROW depth Data and customized the plugin. Pull Request for Change Code.