OpenCV support for Windows Universal Apps now available on GitHub

As a follow up to the initial release of Visual Studio solutions to build OpenCV modules for Windows Phone 8 and Windows Store, MS Open Tech is now making available new solution files to build OpenCV-powered Universal Apps, both for Windows 8.1 and Windows Phone 8.1.

You can find the Universal App template for OpenCV on the MS Open Tech GitHub fork. With this new update, you will be able to generate Windows Phone and Windows Store applications using OpenCV capabilities. Setting up your local environment is pretty straightforward: it simply entails following the detailed instructions listed in the readme.

If you open a Universal App sample in Visual Studio, you will see a familiar structure with three projects, as shown in the image below. Platform specific code sits in the Windows and Windows Phone folders, respectively, while the key business logic is expected to be shared.



You will find the new Windows 8.1 Phone OpenCV modules in the opencv/binWP8_1 folder. The older project files for WinRT 8.0 and Windows Phone 8 remain available.



Getting started with the samples

Together with the solution files, we added a few new samples that should help you hit the ground running:

The Windows 8.1 Phone sample app is in opencv/samples/winrt_universal/PhoneTutorial. This sample shows how to use OpenCV within your C++ application.

The Video Capture Universal app sample is in opencv/samples/winrt_universal/VideoCapture. This specialized sample exposes a lot of complex logic through an easy to use video capture API.

The Windows Phone 8.0 samples remain available at opencv/samples/wp8. We have added a new one called OpenCVXaml. It is intended to help WP8 developers who are trying to use OpenCV through a Silverlight component because of WP8 platform constraints around C++ projects. The sample also demonstrates how to call a C++ WinRT Component function asynchronously, so that OpenCV computations do not block the UI thread.

Over the next few weeks we will be making further updates to our OpenCV samples so that they all use the latest video code and share the same overall design. We will also work with the OpenCV community to eventually merge all these changes into the main repository. In the meantime, please give this code a try! Feel free to report issues and to propose improvements, either by opening issues in github or by providing feedback directly below.


Adalberto Foresti
Principal Program Manager
Microsoft Open Technologies, Inc

Eric Mittelette
Senior Technical Evangelist
Microsoft Open Technologies, Inc

5 thoughts on “OpenCV support for Windows Universal Apps now available on GitHub

  1. I’m working on porting our app ( over to Windows Phone. The app makes heavy use of OpenCV, but unfortunately, the version available for Windows Phone doesn’t seem to be optimized. It most of the internal OpenCV logic runs single threaded (doesn’t take advantage of Parallel Patterns Library and Concurrency) and therefore is very slow for even simple tasks like Canny Edge Detection.

    Our C++ code is shared between iOS, Android and Windows Phone, and while we get near real-time performance and results from iOS and Android versions of the app, the Windows Phone version takes a couple of seconds to process each frame significantly degrading the user experience.

    I hope you guys are planning to improve the Windows Phone port of OpenCV to use multithreading (all WP8+ devices have 2 CPU cores at least) and ARM NEON extensions wherever possible.

  2. Hi, it seems that no highgui.lib is built with the WP8_1 solution. Are the highgui functions included in another library ? How to access the highgui functions (like imread) ?

    Thank you

  3. It is great that you started migrating OpenCV to run under WinRT, however I have encountered a couple of major obstacles. The first one is performance degradation especially related to face detection with the haar cascade. The second problem is the ‘contrib’ library has not been migrated which is essential for face recognition. Do you have any plans to migrate the face recognition code in the contrib folder?