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 ...