Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hololens - Access Camera Frames

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 provide this: http://docs.unity3d.com/550/Documentation/ScriptReference/VR.WSA.WebCam.VideoCapture.html

and the microsoft MediaCapture class with method MediaCapture.StartPreviewToCustomSinkAsync is not very well documented. https://msdn.microsoft.com/en-us/library/windows/desktop/ms701626(v=vs.85).aspx

like image 350
yokto Avatar asked Sep 07 '16 14:09

yokto


People also ask

How do I get video from HoloLens?

If you're logged in with your personal Microsoft account, to access the photos and videos captured on HoloLens, download the OneDrive app from the Microsoft Store on your HoloLens. Once downloaded, open the OneDrive app and select Settings > Camera upload, and turn on Camera upload.

How many cameras does the HoloLens have?

The current generation HoloLens (above) actually has 5 cameras – two on each side for depth sensing using infra-red dot emitters, much like the Kinect, and a centre RGB camera which uses regular ambient light for Simultaneous Localization and Mapping (SLAM), similar to how the cameras in Windows Mixed Reality headsets ...

Does HoloLens have a camera?

HoloLens includes a world-facing camera mounted on the front of the device that enables apps to see what the user sees. Developers have access to and control of the camera, just as they would for color cameras on smartphones, portables, or desktops.

Can the HoloLens record?

Voice to record videosOn HoloLens 2, version 2004 (and later), say: "Start recording." To stop recording, say "Stop recording." On HoloLens (1st gen) or HoloLens 2, version 1903, say: "Hey Cortana, start recording." To stop recording, say "Hey Cortana, stop recording."


1 Answers

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.

like image 71
Eric Smith Avatar answered Oct 22 '22 17:10

Eric Smith