Awesome Open Source
Awesome Open Source

HoloLens With OpenCVForUnity Example

What's new

  • Changed the HoloLensCameraStream plugin to the camnewnham's repository. (Improve camera update FPS, hide recording icon, extract camera intrinsic)

Demo Video (old version)

Demo Hololens App



  1. Download the latest release unitypackage. HoloLensWithOpenCVForUnityExample.unitypackage
  2. Create a new project. (HoloLensWithOpenCVForUnityExample)
    • Change the platform to UWP in the "Build Settings" window.
  3. Import the OpenCVForUnity.
    • Setup the OpenCVForUnity. (Tools > OpenCV for Unity > Set Plugin Import Settings)
    • Move the "OpenCVForUnity/StreamingAssets/haarcascade_frontalface_alt.xml" and "OpenCVForUnity/StreamingAssets/lbpcascade_frontalface.xml" to the "Assets/StreamingAssets/" folder.
  4. Clone HoloLensCameraStream repository.
    • Copy the "HoloLensCameraStream/HoloLensVideoCaptureExample/Assets/CamStream/" folder to the "Assets/" folder.
    • Set the scripting backend of the plugin inspector to "Any Script Backend". (IL2CPP support)
  5. Import the Microsoft.MixedReality.Toolkit.Unity.Foundation.2.2.0.unitypackage.
    • Setup the MRTKv2. (Mixed Reality ToolKit > Utilities > Configure Unity Project)
    • Do not enable the "Enable MSBuild for Unity" option in the "MRTK Project Configurator > Modify Configurations" tab.
  6. Import the HoloLensWithOpenCVForUnityExample.unitypackage.
  7. Add the "Assets/HoloLensWithOpenCVForUnityExample/*.unity" files to the "Scenes In Build" list in the "Build Settings" window.
  8. Setup a performance environment suitable for Holorens. (See
    • Enable "WebCam" Capabilties in Publishing settings tab.
  9. Build and Deploy to HoloLens. (See
    • (Print the AR marker "CanonicalMarker-d10-i1-sp500-bb1.pdf" and "ChArUcoBoard-mx5-my7-d10-os1000-bb1.pdf" on an A4 size paper)
Project Assets MRTK Project Configurator
ProjectAssets.jpg MRTKProjectConfigurator.jpg
Build Settings Player Settings
BuildSettings.jpg PlayerSettings.jpg

ScreenShot (old version)






Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
C Sharp (164,057
Unity (18,537
Opencv (13,311
Augmented Reality (4,461
Face Detection (2,120
Hololens (550
Mixed Reality (216
Aruco (52
Holotoolkit (10