Skip to content

Commit b1b3da8

Browse files
committed
update 1.0.7
1 parent f71c7c8 commit b1b3da8

File tree

8 files changed

+28
-33
lines changed

8 files changed

+28
-33
lines changed

Assets/MagicLeapWithOpenCVForUnityExample/DnnImageCaptureExample/DnnImageCaptureExample.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,7 @@ private void Update()
313313
/// </summary>
314314
private void UpdateStatusText()
315315
{
316-
_statusText.text = string.Format("<color=#dbfb76><b>{0}</b></color>\n{1}: {2}\n",
317-
LocalizeManager.GetString("ControllerData"),
318-
LocalizeManager.GetString("Status"),
319-
LocalizeManager.GetString(ControllerStatus.Text));
316+
_statusText.text = string.Format("<color=#dbfb76><b>Controller Data</b></color>\nStatus: {0}\n", ControllerStatus.Text);
320317
}
321318

322319
/// <summary>

Assets/MagicLeapWithOpenCVForUnityExample/FaceDetectionRawVideoCaptureExample/FaceDetectionRawVideoCaptureExample.cs

+16-23
Original file line numberDiff line numberDiff line change
@@ -363,27 +363,20 @@ public void EndCapture()
363363
/// Update Status Tabin Ui.
364364
/// </summary>
365365
private void UpdateStatusText()
366-
{
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));
371-
372-
_statusText.text += string.Format("\n<color=#dbfb76><b>{0}</b></color>:\n", LocalizeManager.GetString("VideoData"));
366+
{
367+
_statusText.text = string.Format("<color=#dbfb76><b>Controller Data </b></color>\nStatus: {0}\n", ControllerStatus.Text);
368+
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

@@ -584,14 +577,14 @@ void SetupCameraIntrinsics()
584577
/// <param name="parameters">The camera calibration values to pull from.</param>
585578
static string CalibrationParametersToString(MLCamera.IntrinsicCalibrationParameters parameters)
586579
{
587-
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"));
580+
StringBuilder b = new StringBuilder();
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/MagicLeapWithOpenCVForUnityExample/FaceDetectionRawVideoCaptureExample/OpenCVRawVideoCaptureVisualizer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public class OpenCVRawVideoCaptureVisualizer : MonoBehaviour
7171
/// <summary>
7272
/// LBP_CASCADE_FILENAME
7373
/// </summary>
74-
protected static readonly string LBP_CASCADE_FILENAME = "lbpcascade_frontalface.xml";
74+
protected static readonly string LBP_CASCADE_FILENAME = "objdetect/lbpcascade_frontalface.xml";
7575

7676

7777
/// <summary>

README.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,20 @@
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+
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+
99

1010

1111
## Setup
1212
1. Download the latest release unitypackage. [MagicLeapWithOpenCVForUnityExample.unitypackage](https://github.com/EnoxSoftware/MagicLeapWithOpenCVForUnityExample/releases)
13-
1. Create a new project. (MagicLeapWithOpenCVForUnityExample) and [setup UnityProject](https://developer.magicleap.com/learn/guides/get-started-developing-in-unity).
13+
1. Create a new project. (MagicLeapWithOpenCVForUnityExample) and [setup UnityProject](https://developer.magicleap.com/en-us/learn/guides/import-the-magic-leap-unity-package).
14+
* 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).
15+
![magicleap_sdk_for_unity.png](magicleap_sdk_for_unity.png)
16+
* Setup MagicLeap PROJECT SETUP TOOL.
17+
![project_setup_tool.png](project_setup_tool.png)
18+
* Copy [the "MagicLeap" folder](https://github.com/magicleap/MagicLeapUnityExamples/tree/main/Assets) to your project.
1419
1. Import the OpenCVForUnity.
1520
* Setup the OpenCVForUnity. (Tools > OpenCV for Unity > Set Plugin Import Settings)
1621
* Move the "OpenCVForUnity/StreamingAssets/" folder to the "Assets/" folder.

magicleap_sdk_for_unity.png

157 KB
Loading

manifest_settings.PNG

-51.8 KB
Loading

project_setup_tool.png

61 KB
Loading

setup.PNG

45.8 KB
Loading

0 commit comments

Comments
 (0)