Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

DIY OpenCV for HoloLens (Solved)

Hey guys I have seen tons of posts asking on how to get OpenCV to work with Windows and I am here to tell you that it has been solved. I myself did not come up with this solution but, I merely found it and thought I should share it.

Basically, all you need to do is open up Visual Studios, create a new project and go to Visual C++ -> Windows Universal -> DLL and create the project. (You might have to install as it is not default with VS)

Once you have created the project, go to the top Project -> Manage NuGet Packages and browse for OpenCV-HoloLens by Sylvain Prevost and Install it. Once you have this installed you can create a C++ file inside the project for your customized methods for communicating to Unity.

For a better explained tutorial on interacting with OpenCv and Unity you can look at this guys tutorial here

Next you build your DLL and inside your Unity project create a folder called PlugIns and add all of your Dll files from your build to your project and viola OpenCV for HoloLens.

You cannot run your project in the editor as Unity does not support UWP plugins

AR Developer

Best Answer

  • Options
    dbarrettdbarrett ✭✭✭
    Answer ✓

    Also if you use the source code from the tutorial, it will ask you to add a reference to pch.h you have to make sure you add it as the first include in the project otherwise it will throw a bunch of errors.

    It will also say to build as a x64 you don't want to do this. Make sure it is x86.

    AR Developer

Answers

  • Options
    dbarrettdbarrett ✭✭✭
    Answer ✓

    Also if you use the source code from the tutorial, it will ask you to add a reference to pch.h you have to make sure you add it as the first include in the project otherwise it will throw a bunch of errors.

    It will also say to build as a x64 you don't want to do this. Make sure it is x86.

    AR Developer

  • Options

    Well I combined OpenCV-HoloLens by Sylvain Prevost and OpenCvSharp to make a UWP compatible wrapper. You can access the Repository here

  • Options

    I keep getting "unsafe" code compilation failed error and could not find "Assembly c-sharp" error. What are the solutions

Sign In or Register to comment.