Skip to content

An example of a Nreal Light MR app by using NRSDK and DlibLandmarkDetector.

Notifications You must be signed in to change notification settings

EnoxSoftware/NrealLightWithDlibFaceLandmarkDetectorExample

Repository files navigation

NrealLight (XREAL Light) With DlibFaceLandmarkDetector Example

Demo Video

Demo NrealLight App

Environment

  • Android (Galaxy S10+ SC-04L)
  • Nebula 3.8.1
  • Nreal Light (XREAL Light)
  • Unity 2021.3.35f1+ (NRSDK supports the development environment of Unity 2019.4.X and above)
  • NRSDK NRSDKForUnity 2.1.0
  • OpenCV for Unity 2.6.4+
  • Dlib FaceLandmarkDetector 1.4.1+

Setup

  1. Download the latest release unitypackage. NrealLightWithDlibFaceLandmarkDetectorExample.unitypackage
  2. Create a new project. (NrealLightWithDlibFaceLandmarkDetectorExample)
    • Change the platform to Android in the "Build Settings" window.
  3. Import the OpenCVForUnity.
    • Select MenuItem[Tools/OpenCV for Unity/Open Setup Tools].
    • Click the [Move StreamingAssets Folder] button.
    • Leave the following files and delete the rest. ("StreamingAssets/OpenCVForUnity/objdetect/haarcascade_frontalface_alt.xml", "lbpcascade_ frontalface.xml")
  4. Import the DlibFaceLandmarkDetector.
    • Select MenuItem[Tools/Dlib FaceLandmark Detector/Open Setup Tools].
    • Click the [Move StreamingAssets Folder] button.
    • Leave the following files and delete the rest. ("StreamingAssets/DlibFaceLandmarkDetector/sp_human_face_68.dat", "sp_human_face_68_for_mobile.dat", "sp_human_face_17.dat", "sp_human_face_17_for_mobile.dat" and "sp_human_face_6.dat")
  5. Import the NRSDK.
  6. Import the NrealLightWithDlibFaceLandmarkDetectorExample.unitypackage.
  7. Add the "Assets/NrealLightWithDlibFaceLandmarkDetectorExample/*.unity" files to the "Scenes In Build" list in the "Build Settings" window.
  8. Build and Deploy to Android device. (See 8. Building NRSDK App for Android)
Project Assets Build Settings
ProjectAssets.jpg BuildSettings.jpg

ScreenShot

screenshot01.jpg

screenshot02.jpg

screenshot03.jpg