EnoxSoftware / MagicLeapWithOpenCVForUnityExample

MagicLeap with OpenCVforUnity Example
20 stars 8 forks source link

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

Closed artiransaygin closed 4 years ago

artiransaygin commented 4 years ago

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

EnoxSoftware commented 4 years ago

I used mldb to get the screen capture. https://developer.magicleap.com/ja-jp/learn/guides/sdk-mldb-capturing-media

artiransaygin commented 4 years ago

Yes, that's what I was doing. What I am asking for is a way to record the stream while the face detection example is running. Magic Leap's VideoCaptureExample does that and you can see that it is recording the canvas when the app is running since there is a "REC" sign displayed above the screen.

EnoxSoftware commented 4 years ago

If _rawVideoCaptureMode is false, the video be recorded. If _rawVideoCaptureMode is true, no video be recorded and the raw video frame be displayed. FaceDeceptionRawVideoCaptureExample gets a raw video frame with _rawVideoCaptureMode=true. https://github.com/EnoxSoftware/MagicLeapWithOpenCVForUnityExample/blob/master/Assets/MagicLeapWithOpenCVForUnityExample/FaceDetectionRawVideoCaptureExample/FaceDetectionRawVideoCaptureExample.cs#L81

artiransaygin commented 4 years ago

But then I need to run the project with the codes that are currently commented out at https://github.com/EnoxSoftware/MagicLeapWithOpenCVForUnityExample/blob/master/Assets/MagicLeapWithOpenCVForUnityExample/FaceDetectionRawVideoCaptureExample/FaceDetectionRawVideoCaptureExample.cs#L81 , right? And if _rawVideoCaptureMode is false, then I think face detection would not work, right? So only the world view would be recorded but not the face detection app running in real-time?

EnoxSoftware commented 4 years ago

Yes, I don't know if MagicLeap API can get a raw video frame and record the video while doing the image processing.