O'Reilly logo

Microsoft HoloLens By Example by Joshua Newnham

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

FrameGrabber

Let's now turn our attention to the class that will be responsible for capturing the frames, most of which should look familiar to you (if you have read the previous chapter).  There is a bit of code, most of which is boilerplate, so let's build it up bit by bit. 

Create a new C# class in the Content folder, calling it FrameGrabber, and add the following namespaces:

using Windows.Graphics.Imaging;using Windows.Media;using System.IO;using Windows.Storage.Streams;using System.Numerics;using Windows.Media.Capture.Frames;using Windows.Media.Capture;

As we saw in the preceding code snippet, FrameGrabber is responsible for capturing frames from the color camera of the HoloLens and attaching metadata, such as the user's current position ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required