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.

API For capturing Hologram and surroundings (Mixed Reality Capture)

I am looking for an Class or API for taking a screenshot of what is visible to the hololens user similar to the functionality for taking screenshot provided in the Windows Device Portal of the Hololens. I tried UnityEngine.VR.WSA.WebCam of the Unity Engine but that just takes a picture from the WebCam minus the hologram. The Windows.Media.Capture.AppCapture does not provide any such methods but only provides an event AppcaptureView_CapturingChanged to check when a screen is being capture via the device portal.
I also tried replicating the functionality provided by the Windows Device Portal as described here https://github.com/Microsoft/WindowsDevicePortalWrapper/blob/master/WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/HoloLens/MixedRealityCapture.cs

I was able to take a screenshot using the guidance provided by the MixedRealityCapture.cs but however the hologram was missing from it .

Does anyone know of any Class, API which could do capture the hologram?

Tagged:

Answers

  • edited March 2017

    @Rubin,
    Are you trying to make the screenshot from an application running on the PC (via the Windows Device Portal Wrapper API) or from within a HoloLens application?

    If you are using the Windows Device Portal Wrapper API (or the Device Portal REST API) you will need to make sure that you request the Holograms to be included.

    • Using the wrapper API, call the TakeMrcPhotoAsync method and set includeHolograms to true.
    • Using the Device Portal REST API, make a GET request with a path of api/holographic/mrc/photo and a query string containing "holo=true".

    If you wish to take the screenshot from within a HoloLens application, I suggest reviewing the Mixed Reality Capture documentation.

    Thanks!
    David

  • RubinRubin
    edited March 2017

    Thanks David, I was trying to take a screenshot from within a Hololens Application . The device portal API wrapper I implemented from within the hololens app, however that did not capture the hologram inspite of setting the query string holo=true. The Mixed Reality Capture documentation helped and I was finally able to capture the hologram by implementing the IVideoEffectDefinition interface for MR as described here

Sign In or Register to comment.