Camera API for a Windows 8 Tablet on Visual Studio Express 2013 (For Windows Desktop)

I want to write a program for my tablet using Visual Studio Express 2013 (for Windows Desktop). The tablet is running Windows 8.1 Pro.

For compatibility and ease of programming, I would like to continue working in VS Express 2013 for Windows Desktop.

I want my program to use the device's camera capture functionality. I would hope that this would be as simple as using libraries/APIs that are already widely known. However, all of the documentation and help forum posts I have read so far suggest that WIA (Windows Image Acquisition) was the library to use for desktops and Windows Media Capture must be used for Windows 8.1.

Is there a better way?


All you need to do is specify a CaptureElement and a Button to capture the Picture as Shown Below

    <CaptureElement x:Name="cap1" Height="300" Width="450"/>
    <Button Content="Take a Photo" x:Name="btnCapture" HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch" Click="btnCapture_Click"/>

Here is the Code Behind the Button :

      private async void btnCapture_Click(object sender, RoutedEventArgs e)
        var _MediaCapture = new MediaCapture();
        await _MediaCapture.InitializeAsync();
        cap1.Source = _MediaCapture;
        await _MediaCapture.StartPreviewAsync();

Remember that you need to use the Async and await keywords as this process is Asynchronous .

Need Your Help

binding generic c++ libraries to python with boost.python

c++ python generics templates boost

I would like to know what's the process, when binding C++ libraries that are written with in a generic way.