CaptureSource & MediaCapture

Jun 11, 2015 at 2:19 PM
Edited Jun 11, 2015 at 2:20 PM
With Build 2014 was introduced a new Windows Camera API, where among other things we use MediaCapture class.

I am trying to create an app for Windows 8.1 following this tutorial of yours, but at arDetector.Initialize(captureSource, 1, 4000, marker); gives me an error.

The first parameter of Inititialize must be an istance of CaptureSource, but is there any way to use an istance of MediaCapture for that purpose?

Beginner’s Guide:
Jun 11, 2015 at 2:32 PM
There is but it's quite a bit of work. You basically need to supply the raw live-video frames into the library.
Jun 11, 2015 at 3:14 PM
Could you give me more detailed information, and where to start from?
Jun 11, 2015 at 4:49 PM
It's quite complicated with WinRT APIs of 8.1 as you have to write a MFT wh.


With Windows 10's UWP Media APIs this should be easier but not sure. You would need to research this a bit.

For SLARToolkit you would have to provide the gray buffer which only contains the brightness for each pixel. You can see this in action in the Win Phone sample:
        // Grab snapshot

        // Detect
        var dr = arDetector.DetectAllMarkers(buffer, pixelWidth, pixelHeight);
Marked as answer by nenad5mcf on 6/11/2015 at 10:31 AM
Jun 11, 2015 at 6:36 PM
Edited Jun 11, 2015 at 6:36 PM
Thak you for your answer. It is very useful!