Git Product home page Git Product logo

magicleapwithopencvforunityexample's Introduction

MagicLeap With OpenCVForUnity Example

Environment

  • MagicLeapOne Lumin OS 0.98.30
  • Lumin SDK 0.26
  • Unity 2020.3.29f1 (64-bit)
  • OpenCV for Unity 2.4.7+

Setup

  1. Download the latest release unitypackage. MagicLeapWithOpenCVForUnityExample.unitypackage
  2. Create a new project. (MagicLeapWithOpenCVForUnityExample) and setup UnityProject.
  3. Import the OpenCVForUnity.
  4. Import the MagicLeapWithOpenCVForUnityExample.unitypackage. setup.PNG
  5. Add the "Assets/MagicLeapWithOpenCVForUnityExample/*.unity" files to the "Scenes In Build" list in the "Build Settings" window.
  6. Check CameraCapture and ComputerVision checkbox in Publishing Settings. manifest_settings.PNG
  7. Build and Deploy to MagicLeap.

ScreenShot

dnn_imagecapture_example.jpg facedetection_rawvideocapture_example.jpg

magicleapwithopencvforunityexample's People

Contributors

enoxsoftware avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

magicleapwithopencvforunityexample's Issues

no support for SDK 0.26. and Lumin OS 0.98

Since Magic changed their app certificate signing method, I cant use older OS than 0.98 to develop.
I bought your OpenCVfor Unity in the asset store but I cant run it because your OpenCV lib is not for Lumin 0.98
Dear ExonSoft, a lot of Magic Leap devices are being sold for cheap. Your software would be a good base for a lot of projects,.

MagicLeapFaceDetectionExample - Only Blank Screen on Magic Leap

First of all, thanks for the great project. I have tried the face detection scene with my webcam successfully and it beautifully works in real time. However, when I tried deploying the project to Magic Leap, the only thing I see is a blank screen. No menu, no nothing. I only need real-time face detection, so that is the only scene I added to the "Scenes in Build".

My LuminOS version is 0.98.10, I am using Unity 2019.2.0f1 and the OpenCV for Unity version is 2.3.8. I checked other issues like "MagicLeapArUcoExample is just a blank screen" but I don't see a solution there. One additional parameter I am questioning is the Minimum API Level which is 4 right now. Is there something I need to do to run a specific scene on Magic Leap other than following the ReadMe file? I would really appreciate it if you could help me. I really need to get this working. Thanks.

Recording video while running the app and getting rid of the zoomed in view behind the face detection UI

I want to record the scene while running the app, however, when I include the commented out parts of MagicLeapFaceDetectionExample, the app crashes after I press the bumper. Is there a way to record a video of what's going on just like Magic Leap's VideoCaptureExample does?

Secondly, as it can be seen in the picture you posted before, there is a zoomed in version of the real world behind the app UI. Is there a way to run face detection without the UI or to get rid of the zoomed in view?

github_img

Diagonal Red Line

Hello,

I followed the tutorial as it is, but when I deployed it on my Magic Leap device, it just showed a diagonal red line appearing on the screen, and the image was also not being captured after clicking the bumper many times.
Can someone please help me with this?
Thanks!

DNN Example with Torch

For the model and config parameters in the MagicLeapDnnExample.cs file, the required file type for the model is specified for Torch (On Line 25: "Path to a binary file of model contains trained weights. It could be a file with extensions .caffemodel (Caffe), .pb (TensorFlow), .t7 or .net (Torch), .weights (Darknet).")

However, it is NOT specified for the config parameter for Torch. (On Line 28: "Path to a text file of model contains network configuration. It could be a file with extensions .prototxt (Caffe), .pbtxt (TensorFlow), .cfg (Darknet).")

What is the required file type for Torch for the config parameter?

Object detection with MobileNet

Hi, I have successfully deployed the Yolo Detection in Magic Leap, would you please tell me if that is possible to use MobileNet to do the same thing? Thank you.

MagicLeapDnnExample does not do anything

I followed all the instructions and got MagicLeapImageCaptureExample to work correctly. However, I am having issues with MagicLeapDnnExample. All I see is a blank screen when I run the example, except the white box, which disappears and leaves me with nothing but black screen.

Unable to find Entry Point

Hi,
I'm trying to run this on my magic Leap. So far I tried the Aruco Tracker example, but only got a blank screen.
Now I tried the Image capture example, but am only getting a white image and the following Error in the console:

EntryPointNotFoundException: Unable to find an entry point names 'core_Mat_n_1Mat_III' in
'opencvforunity'

Any advice on how to solve this or what I'm doing wrong?

Thanks!

MagicLeapArUcoExample is just a blank screen

The Image Capture examples works find, but in the Aruco Tracker Example I just get a blank screen.
This might be a similar issue as #6

Looking at the Debug Console is raises issues with the Canvas. That in VR mode the Canvas might not be visible. My attempts at changing the Canvas settings to fix it failed so far though

Webcam Texture & WebcamDevice: The type or namespace name `WebCamTexture' could not be found. Are you missing an assembly reference?

"Enclose the code related to the WebCamTexture class with #if UNITY_EDITOR and #endif." - could you be more specific which scripts should be removed and which parts of scripts should be enclosed?

Currently have errors when attempting to build, tried removing all examples & scripts with "WebCamTexture" but it created even more errors. Thanks for your help in advance.

captureopencvml1

Face detection app pauses after around 2 minutes

As titled, the face detection example pauses after 2 minutes. I am able to resume the capture by pressing the bumber but needing to do so after every 2 minutes is annoying. I thought of the possibility of a memory leak and tried disposing variables like "faces" or "grayMat", however doing so just causes a crash. What might be the reason behind these pauses? If it's a memory leak, what should I do to solve the problem? Thanks.

Custom Object Detector

Hi,
I have successfully tried the real-time object detection example. Now, I wish to make my own object detection model so that Magic Leap One only detects those certain objects. How can I go about doing that?

Unity 2019.x - custom manifest

Hi, I have a conflict when building in Unity 2019.1.6f.1. On their website ML say:

The custom manifest replaces the Privilege checkboxes found in Player Settings - Publishing Settings in MLTP versions of the editor.

Could you update the example so it requests the CameraCapture permission via custom manifest as described on ML Creator's portal? I currently get build error saying that the package

already has a USES declaration! You may not have your own "USES=" statement in the .package file.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.