1

I'm trying to develop an UWP application which has to use the OpenCV library.

The code simply access the camera and returns:

#include "pch.h"
#include <opencv2/opencv.hpp>
int TEST::OpenCam()
{
    VideoCapture cap(0);
    if(!cap.IsOpened())
    {
        return -1;
    }
    return 0;
}

I've tried to create a WinRT component in c++ which link to OpenCV native libraries, the project compile succesfully but at runtime the whole application crash with the following error:

FileNotFoundException Impossible to find the specified module Exception from HRESULT 0x8007007E

I got this exception if I #include <opencv2/opencv.hpp> and only if working with UWP, the same code works perfectly on a windows console application.

I've tried to compile OpenCv for UWP using following links but I got some problems:

  1. OpenCV: building UWP binaries

  2. Build OpenCV for UWP

The visual studio solution won't fully build because ZERO_CHECK.vcxproj isn't found in the build directory even if it succesfully build.

Cmake for windows give me an error saying that can't find a Visual Studio 15 2017 instance.

I don't know if I've missed something in previous steps but actually I'm not figuring out how to use this library in UWP. Is there a way to use OpenCV inside an UWP app or I must recompile the whole library against that platform?

Marco
  • 705
  • 8
  • 28
  • Have you check this [document](https://learn.microsoft.com/en-us/windows/uwp/audio-video-camera/process-software-bitmaps-with-opencv)? – Nico Zhu Apr 11 '18 at 07:46

0 Answers0