Skip to content

Commit 71603e7

Browse files
committed
update 1.0.6
1 parent 404f4e8 commit 71603e7

File tree

8 files changed

+27
-30
lines changed

8 files changed

+27
-30
lines changed

Assets/MagicLeapWithDlibFaceLandmarkDetectorExample/DlibImageCaptureExample/DlibImageCaptureExample.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
using System.Linq;
2727
using OpenCVForUnity.UtilsModule;
2828
using DlibFaceLandmarkDetector;
29+
using DlibFaceLandmarkDetectorExample;
2930

3031
namespace MagicLeap
3132
{
@@ -209,10 +210,7 @@ private void Update()
209210
/// </summary>
210211
private void UpdateStatusText()
211212
{
212-
_statusText.text = string.Format("<color=#dbfb76><b>{0}</b></color>\n{1}: {2}\n",
213-
LocalizeManager.GetString("ControllerData"),
214-
LocalizeManager.GetString("Status"),
215-
LocalizeManager.GetString(ControllerStatus.Text));
213+
_statusText.text = string.Format("<color=#dbfb76><b>Controller Data</b></color>\nStatus: {0}\n", ControllerStatus.Text);
216214
}
217215

218216
/// <summary>

Assets/MagicLeapWithDlibFaceLandmarkDetectorExample/DlibRawVideoCaptureExample/DlibRawVideoCaptureExample.cs

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -364,26 +364,19 @@ public void EndCapture()
364364
/// </summary>
365365
private void UpdateStatusText()
366366
{
367-
_statusText.text = string.Format("<color=#dbfb76><b>{0} </b></color>\n{1}: {2}\n",
368-
LocalizeManager.GetString("ControllerData"),
369-
LocalizeManager.GetString("Status"),
370-
LocalizeManager.GetString(ControllerStatus.Text));
367+
_statusText.text = string.Format("<color=#dbfb76><b>Controller Data </b></color>\nStatus: {0}\n", ControllerStatus.Text);
371368

372-
_statusText.text += string.Format("\n<color=#dbfb76><b>{0}</b></color>:\n", LocalizeManager.GetString("VideoData"));
369+
_statusText.text += "\n<color=#dbfb76><b>VideoData</b></color>:\n";
373370

374371
if (_rawVideoCaptureMode)
375-
{
376-
_statusText.text += string.Format("{0}: {1}\n",
377-
LocalizeManager.GetString("Mode"),
378-
LocalizeManager.GetString("RawVideoCapture"));
372+
{
373+
_statusText.text += "Mode: Raw Video Capture\n";
379374

380375
_statusText.text += _intrinsicValuesText;
381376
}
382377
else
383-
{
384-
_statusText.text += string.Format("{0}: {1}\n",
385-
LocalizeManager.GetString("Mode"),
386-
LocalizeManager.GetString("VideoCapture"));
378+
{
379+
_statusText.text += "Mode: Video Capture\n";
387380
}
388381
}
389382

@@ -585,13 +578,13 @@ void SetupCameraIntrinsics()
585578
static string CalibrationParametersToString(MLCamera.IntrinsicCalibrationParameters parameters)
586579
{
587580
StringBuilder b = new StringBuilder();
588-
b.AppendFormat("\n <color=#dbfb76><b>{0} {1}:</b></color>", LocalizeManager.GetString("Camera"), LocalizeManager.GetString("IntrinsicValues"))
589-
.AppendFormat("\n {0}: {1}", LocalizeManager.GetString("Width"), parameters.Width)
590-
.AppendFormat("\n {0}: {1}", LocalizeManager.GetString("Height"), parameters.Height)
591-
.AppendFormat("\n {0}: {1}", LocalizeManager.GetString("FocalLength"), parameters.FocalLength)
592-
.AppendFormat("\n {0}: {1}", LocalizeManager.GetString("PrincipalPoint"), parameters.PrincipalPoint)
593-
.AppendFormat("\n {0}: {1}", LocalizeManager.GetString("FOV"), parameters.FOV)
594-
.AppendFormat("\n {0}:", LocalizeManager.GetString("DistortionCoeff"));
581+
b.AppendFormat("\n <color=#dbfb76><b>Camera Intrinsic Values:</b></color>")
582+
.AppendFormat("\n Width: {0}", parameters.Width)
583+
.AppendFormat("\n Height: {0}", parameters.Height)
584+
.AppendFormat("\n Focal Length: {0}", parameters.FocalLength)
585+
.AppendFormat("\n Principal Point: {0}", parameters.PrincipalPoint)
586+
.AppendFormat("\n FOV: {0}", parameters.FOV)
587+
.AppendFormat("\n Distortion Coeff:");
595588
for (int i = 0; i < parameters.Distortion.Length; ++i)
596589
{
597590
b.AppendFormat("\n [{0}]: {1}", i, parameters.Distortion[i]);

Assets/MagicLeapWithDlibFaceLandmarkDetectorExample/DlibRawVideoCaptureExample/DlibRawVideoCaptureVisualizer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// %BANNER_END%
1212

1313
using DlibFaceLandmarkDetector;
14+
using DlibFaceLandmarkDetectorExample;
1415
using OpenCVForUnity.CoreModule;
1516
using OpenCVForUnity.ImgprocModule;
1617
using OpenCVForUnity.ObjdetectModule;

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,21 @@
22

33

44
## Environment
5-
* MagicLeapOne Lumin OS 0.98.10
6-
* Lumin SDK 0.24.1
7-
* Unity 2019.3.10f1 (64-bit)
8-
* [OpenCV for Unity](https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088?aid=1011l4ehR) 2.3.9+
9-
* [Dlib FaceLandmarkDetector](https://assetstore.unity.com/packages/tools/integration/dlib-facelandmark-detector-64314?aid=1011l4ehR) 1.3.0+
5+
* MagicLeapOne Lumin OS 0.98.30
6+
* Lumin SDK 0.26
7+
* Unity 2020.3.29f1 (64-bit)
8+
* [OpenCV for Unity](https://assetstore.unity.com/packages/tools/integration/opencv-for-unity-21088?aid=1011l4ehR) 2.4.7+
9+
* [Dlib FaceLandmarkDetector](https://assetstore.unity.com/packages/tools/integration/dlib-facelandmark-detector-64314?aid=1011l4ehR) 1.3.3+
1010

1111

1212
## Setup
1313
1. Download the latest release unitypackage. [MagicLeapWithDlibFaceLandmarkDetectorExample.unitypackage](https://github.com/EnoxSoftware/MagicLeapWithDlibFaceLandmarkDetectorExample/releases)
14-
1. Create a new project. (MagicLeapWithDlibFaceLandmarkDetectorExample) and [setup UnityProject](https://developer.magicleap.com/learn/guides/get-started-developing-in-unity).
14+
1. Create a new project. (MagicLeapWithDlibFaceLandmarkDetectorExample) and [setup UnityProject](https://developer.magicleap.com/en-us/learn/guides/import-the-magic-leap-unity-package).
15+
* Import the Magic Leap SDK for Unity asset from the [Unity Asset Store](https://assetstore.unity.com/packages/tools/integration/magic-leap-sdk-for-unity-194780).
16+
![magicleap_sdk_for_unity.png](magicleap_sdk_for_unity.png)
17+
* Setup MagicLeap PROJECT SETUP TOOL.
18+
![project_setup_tool.png](project_setup_tool.png)
19+
* Copy [the "MagicLeap" folder](https://github.com/magicleap/MagicLeapUnityExamples/tree/main/Assets) to your project.
1520
1. Import the OpenCVForUnity.
1621
* Setup the OpenCVForUnity. (Tools > OpenCV for Unity > Set Plugin Import Settings)
1722
1. Import the DlibFaceLandmarkDetector.

magicleap_sdk_for_unity.png

157 KB
Loading

manifest_settings.PNG

-51.8 KB
Loading

project_setup_tool.png

61 KB
Loading

setup.PNG

41.9 KB
Loading

0 commit comments

Comments
 (0)