1

I'm trying to use OpenCV face recognition on a Windows Store App. I could not find any WinRT version of OpenCV except for the branch on github: https://github.com/asmorkalov/opencv/tree/winrt.

But I believe it requires a fresh build. What is to best way to compile this branch from scratch? Is this tutorial the best way? http://opencv.willowgarage.com/wiki/InstallGuide

Vinicius Rocha
  • 4,023
  • 4
  • 29
  • 38
  • 1
    The willowgarage website you provided is of no use to you – Bull Jun 04 '13 at 01:34
  • check this stackoverflow post out http://stackoverflow.com/questions/14065370/using-opencv-in-a-windows-8-store-app-with-visual-c-2012 – Raman Sharma Sep 20 '13 at 17:18
  • Also in this link, the demo uses OpenCV for doing face detection in a Windows 8 x86 Store app http://channel9.msdn.com/Events/TechEd/NorthAmerica/2012/DEV322 – Raman Sharma Sep 20 '13 at 17:19

2 Answers2

2

Microsft provides a ready-to-build .sln for WinRT here: https://github.com/MSOpenTech/opencv

Crowcoder
  • 11,250
  • 3
  • 36
  • 45
1

According to http://code.opencv.org/projects/opencv/wiki/WindowsRT: Get release source or clone Github repo and checkout '2.4.5' tag:

git clone https://github.com/Itseez/opencv.git
git checkout -b 2.4.5 origin/2.4.5

Build steps for public OpenCV

  1. Open Visual Studio development console.
  2. Setup environment for cross compilation by command "C:\Program Files\Microsoft Visual Studio 11.0\VC\bin\x86_arm\vcvarsx86_arm.bat"
  3. cd /platforms/winrt/
  4. run scripts/cmake_winrt.cmd
  5. run ninja

You should check the web page for the list of prerequisites.

Bull
  • 11,771
  • 9
  • 42
  • 53
  • The problem is that these instructions leads to an ARM based version of the OpenCV, my tablet uses an x86 processor. Is there any WinRT version of OpenCV that targets x86? – Vinicius Rocha Jun 05 '13 at 21:19
  • Probably best to ask at http://answers.opencv.org/questions/. What happens if you change step 2 to `...\Microsoft Visual Studio 11.0\VC\bin\vcvars32.bat` ? – Bull Jun 06 '13 at 00:27
  • msvcprt.lib(MSVCP110.dll) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'ARM' LINK failed. with 1112 ninja: build stopped: subcommand failed. – Vinicius Rocha Jun 06 '13 at 15:36