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 books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.