- Android (Galaxy S10+ SC-04L)
- Nreal Light
- Unity 2020.3.38f1+ (NRSDK supports the development environment of Unity 2018.4.X and above.)
- NRSDK Unity SDK 1.10.0
- OpenCV for Unity 2.5.0+
- Dlib FaceLandmarkDetector 1.3.4+
- Download the latest release unitypackage. NrealLightWithDlibFaceLandmarkDetectorExample.unitypackage
- Create a new project. (NrealLightWithDlibFaceLandmarkDetectorExample)
- Change the platform to Android in the "Build Settings" window.
- 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")
- 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")
- Import the NRSDK.
- Download the latest release NRSDK unitypackage. NRSDKForUnity_Release_1.xx.x.unitypackage
- Setup the NRSDK. (See Getting Started with NRSDK)
- Import the NrealLightWithDlibFaceLandmarkDetectorExample.unitypackage.
- Add the "Assets/NrealLightWithDlibFaceLandmarkDetectorExample/*.unity" files to the "Scenes In Build" list in the "Build Settings" window.
- Build and Deploy to Android device. (See 8. Deploy to Nreal Device)
Project Assets | Build Settings |
---|---|