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.
Object tracking for HoloLens
Hi,
I would like to track an object by tracking the tag on the object.
I plan to use OpenCV. I use c++/cx and DirectX to do the development.
How to use OpenCV for UWP on HoloLens?
Thanks.
YL
Best Answer
-
Optionsutekai ✭✭✭
I've been working on this a bit from time to time.
But so far no success. Still working to get OpenCVSharp for Windows 10 UWP apps (targeting .Net for Windows Universal).
General approach is to convert this sample to run as UWP app, then will work to get it going on hololens, but once it's running as UWP the only issue would be if the opencv port can immediately access the camera on the hololens, if so, the rest is likely easy.
But what's currently in the way is a UWP opencvsharp.dll for windows 10 .
https://github.com/shimat/opencvsharp won't work in a UWP app as it relies on the .net framework.
Also found this, but haven't gone through it yet https://blogs.msdn.microsoft.com/lucian/2015/11/27/opencv-building-uwp-binaries/
I guess it's surprising the Microsoft hasn't already provided OpenCV with UWP wrapper.
This previous post already explored this issue a bit. It references this port of opencv which runs on hololens (according to the post). I'm just a bit reticent to spend on open source software. It also shows up as a beta version for UWP on the support page https://enoxsoftware.com/opencvforunity/
5
Answers
I've been working on this a bit from time to time.
But so far no success. Still working to get OpenCVSharp for Windows 10 UWP apps (targeting .Net for Windows Universal).
General approach is to convert this sample to run as UWP app, then will work to get it going on hololens, but once it's running as UWP the only issue would be if the opencv port can immediately access the camera on the hololens, if so, the rest is likely easy.
But what's currently in the way is a UWP opencvsharp.dll for windows 10 .
https://github.com/shimat/opencvsharp won't work in a UWP app as it relies on the .net framework.
Also found this, but haven't gone through it yet https://blogs.msdn.microsoft.com/lucian/2015/11/27/opencv-building-uwp-binaries/
I guess it's surprising the Microsoft hasn't already provided OpenCV with UWP wrapper.
This previous post already explored this issue a bit. It references this port of opencv which runs on hololens (according to the post). I'm just a bit reticent to spend on open source software. It also shows up as a beta version for UWP on the support page https://enoxsoftware.com/opencvforunity/
I had the same need - I ended up 'adjusting' the build of opencv (so I could reproduce and complete the vs2015 samples branch of Lucian Wischik) and because I had misc projects, I also created corresponding Nuget build.
Nuget package: https://www.nuget.org/packages/OpenCV-Hololens
sources: https://github.com/sylvain-prevost/opencv-hololens