Hololens - Access Camera Frames

前端 未结 2 1272
既然无缘
既然无缘 2021-01-06 00:52

How can I access all frames in a video stream from the hololens camera, when in 3D mode? I\'m using C#.

The unity VideoCapture class doesn\'t seem to pr

相关标签:
2条回答
  • 2021-01-06 01:32

    We made an open source project called CameraStream to address this need. As a Unity plugin, it uses MediaCapture to feed the byte array into Unity (along with locatable matrices). From there you can assign the bytes to a Texture2D, as shown in the provided Unity example.

    Our VideoCapture class mimic's Unity's class of the same name so that developers would be familiar with how to use it. We're also assuming that this functionality will be provided by Unity out-of-the-box eventually.

    0 讨论(0)
  • 2021-01-06 01:34

    You can try using the MediaCapture FrameReader API

    Documentation: https://msdn.microsoft.com/en-gb/windows/uwp/audio-video-camera/process-media-frames-with-mediaframereader#create-a-frame-reader-for-the-frame-source

    Sample code: https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/CameraFrames

    0 讨论(0)
提交回复
热议问题