Closed hozkelemci closed 10 years ago
The nuget package for OpenCV automates this for us now. You can instead right click the project and choose Manage Nuget Packages, then search online for opencv.
Sent from my Windows Phone
From: hozkelemcimailto:notifications@github.com Sent: 6/16/2014 12:38 AM To: MSOpenTech/opencvmailto:opencv@noreply.github.com Subject: [opencv] Adding references to WP8.0 project (#4)
I’m trying to use the OpenCV dlls in a Windows Phone 8.0 project.
I built the solution at binWP8 folder by targeting ARM. However when I try to add dlls as a reference to WP8.0 project, I get below error message: “A reference to a higher version or incompatible assembly cannot be added to the project”
Is this this the correct way of adding the references to a new WP8.0 project or should I do something before hand? Thanks.
Reply to this email directly or view it on GitHub: https://github.com/MSOpenTech/opencv/issues/4
Actually I tried some of the nuget packages. But couldn't be successful. For example nuget package by ltseez gives below error. Which nuget package is working for you on WP8.0 project?
Could not install package 'OpenCV 2.4.8'. You are trying to install this package into a project that targets 'WindowsPhone,Version=v8.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
It's not the ltseez version as that's from January. There is (or shortly will be) a more recent one from around June from MSOpenTech.
We have not officially released the nuget packages for opencv. They will be out shortly. Look at opencv/samples/wp8. There are two examples showing how to add the opencv projects to a WP8 app.
Please feel free to ping back with questions.
Thanks for clarifying this. Note: once the user attempts to install the wrong nuget package, it can create the type of conflict hozkelemci is experiencing if they try to go back and add DLL's the traditional way. Nuget tries to automatically update (when specified) and uninstalling packages doesn't always seem to go cleanly, so it's probably best to start from scratch and then refer to the example at opencv/samples/wp8.
Thanks stammen and figment3d. However I have problem with the samples too. Only PhoneXamlDirect3DApp1Comp.dll is added as a reference to the sample C# WP8.0 projects (i.e. OcvImageManipulation and OcvRotatingCube). When I try to add for example opencv_core.dll, even to these sample projects I get below message:
"Unable to add the specified project reference. The reference must be a Windows Phone project that targets the current or earlier version of the Windows Phone OS."
Is this the case for you as well?
So I can only use some interop methods like CreateTexture or SetAlgorithm from PhoneXamlDirect3DApp1Comp.dll in a C# WP8.0 project.
In order to use other opencv functions, like for example smoothers, should I write an interop code in C++?
That is correct. You must have an interop dll written in C++ to access the opencv code. The opencv dlls are currently for C++ only and cannot be directly accessed from C#. The opencv API is C++ only.
To clarify, here is a screenshot of how the sample WP8 projects look when opened. Note that it's 6 C++ modules added to the OcvImageManipulation C# project (opencv goes through a central hub (PhoneXamlDirect3DApp1Comp), whose connections were derived from a Sample project).
Thanks guys, it's more clear now.
I’m trying to use the OpenCV dlls in a Windows Phone 8.0 project.
I built the solution at binWP8 folder by targeting ARM. However when I try to add dlls as a reference to WP8.0 project, I get below error message: “A reference to a higher version or incompatible assembly cannot be added to the project”
Is this this the correct way of adding the references to a new WP8.0 project or should I do something else before hand? Thanks.