Capturing frames 

Armed with FrameGrabber, let's return to our AssistantItemFinderMain class and put it to use. Start by opening up the AssistantItemFinderMain class in Visual Studio and add the variable:

FrameGrabber frameGrabber; 

Next, make the following amendments to the SetHolographicSpace method:

public void SetHolographicSpace(HolographicSpace holographicSpace){// ... InitServices();// ...}async void InitServices(){frameGrabber = await FrameGrabber.CreateAsync(this);}

If you remember, FrameGrabber.CreateAsync is excepting a class conforming to the interface IFrameGrabberDataSource. Make the necessary update (adding the IFrameGrabberDataSource interface to the AssistantItemFinderMain class). Conveniently, our AssistantItemFinderMain ...

Get Microsoft HoloLens By Example now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.