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

Getting depth data of Hololens in Unity (C#)

Hi,

I am working on a project related to Hololens using Unity. I have to get the depth data from Hololens' sensors. Following the below code:

var videomediaframe = mediaframereference?.VideoMediaFrame;
var softwarebitmap = videomediaframe?.SoftwareBitmap;
if (softwarebitmap != null)
{
softwarebitmap.CopyToBuffer(bytes.AsBuffer());
}

and when I load "bytes" to a texture. It looks like this:

This image looks like a side by side image. How can I get only one side of the image (left or right)?
Now, I have to workaround by splitting this texture by some code but I think I missed something in somewhere. Because in the C++ project, I can get a single side image from the sensor perfectly.~~~~

Thank you very much!

Sincerely,

Tagged:
Sign In or Register to comment.