Easy AR 3.0 Unity Doesn't work on Android nor on Windows

+6 votes
asked Jul 9, 2019 by juvelez (910 points)
edited Jul 9, 2019 by juvelez
It doesn't work on Motorola G6/G6Plus/One with last Android, nor on ASUS 7" Tablet with 4.4 Kitkat, EasyAR 2.3 used to work fine on all of these devices, the only thing it needed was x64 Android Support, pretty sad... because we must move to an alternative, pretty sad, because 2.3 worked really fine, but it is unusable right now.

It is also not working on Windows, web cams are not recognized, they even doesn't turn on, and black screens is the only view.

PD: the message at the beginning with the EasyAR version is mandatory?, it breaks all the UX design

2 Answers

+4 votes
answered Jul 9, 2019 by danidiazr (380 points)
Same problem here!

SDK 2.3 was amazing, I needed too x64 android support too. Now the camera can't focus, troubles with webcam, UI is hiding, it takes a long time to recognize targets... and of course that message of EasyAR version.
commented Jul 10, 2019 by ag3OlbMfIwtXAlq (480 points)
you can find 'GUIPopup.AddShowMessage' in EasyARBehaviour.cs , and remove it. mabay the ui will not work
commented Jul 10, 2019 by zhnagjian (11,130 points)
Which UI is hidde and what is your phone model? Can you tell me what sample did you run?  ImageTracker is created using ImageTracker.create, ImageTracker.createWithMode(ImageTrackerMode.PreferQuality) or ImageTracker.createWithMode(ImageTrackerMode.PreferPerformance)?
commented Jul 10, 2019 by ag3OlbMfIwtXAlq (480 points)
edited Jul 10, 2019 by ag3OlbMfIwtXAlq
it all can work, If your phone performs well,use ImageTrackerMode.PreferQuality. if not use ImageTrackerMode.PreferPerformance
commented Jul 10, 2019 by danidiazr (380 points)
I've tried simple ImageTarget sample. I built it for Galaxy Note 8 and iPhone 6S. I had some UI for the camera in 3 different scenes, that UI was "extended", it's like the canvas expands about to 200%, border images are hidden and central images are visible. And now the camera can't focus, I've tried whole 4 options of focus and it still cannot focus... is there an exact way to make the camera focus?
commented Jul 10, 2019 by ag3OlbMfIwtXAlq (480 points)
it is a bug ,You should set focus affter you turn on camera, you can find the code in ARsession.cs on line 94
+2 votes
answered Jul 11, 2019 by juvelez (910 points)


Webcams on Windows still doesn't work

I was able to create a project from ground, with 13 image targets, duplicating the sample scene for multi_target, I wasn't able to start from the ground yet, some comments:

  • For image tracking you must ensure that Easyar Camera Prefer is set to "Prefer Object Sensing", if you use other setting here and you are trying to track images, you are going to view a black screen
  • Each image marker is 512x512x72dpi
  • None of the Camera Focus Mode Options worked, editing ARsession.cs, moving the line easyarCamera.setFocusMode(CameraFocusMode); from line 96 after easyarCamera.start(); on line 106 worked, I think that the camera must be started before can be focused, on some old devices doesn't work this solution despite their cameras has autofocus functionality
  • The markers are not well detected if are projected on a screen, if are printed work much better
For now its work now on Moto G6 Plus latest Android, and on Asus HD7 Android 4.2.2
I'm going to test on Apple iPad Mini 2/4, iPad AIR, iPhone SE, iPhone 6s, when finish this testing I am going to feedback here
commented Aug 14, 2019 by zhangpengar (3,060 points)
The pixel size of markers don't have much impact on the performance.
Camera size may contributes to the performance, but there is a known drawback on the current iOS camera implementation in EasyAR that it only supports 640x480, 1280x720 and 1920x1080, which will be fixed in EasyAR 4.
I have tested on an iPad Mini 2 and found that increasing the frame rate can make it somewhat smoother. https://www.easyar.com/doc/EasyAR%20SDK/API%20Reference/3.0/CameraDevice.html#setframeraterange
Fork and Join are dataflow utility nodes used for branching and merging parallel flows. The numbers are used to change the number of output or input ports. You need to connect these ports, or the flow may stuck at Join. https://www.easyar.com/doc/EasyAR%20SDK/API%20Reference/3.0/Overview.html#dataflow
Different operating systems and camera hardwares require different pixel formats. In the current implementation, only YUV_NV12 is needed on iOS.
commented Aug 14, 2019 by juvelez (910 points)
edited Aug 15, 2019 by juvelez
Where is the right place to increase the frameRateRange? I placed this line easyarCamera.setFrameRateRange(3); just after easyarCamera.setFocusMode(CameraFocusMode); in ARSession.cs, is it right? which are the valid FrameRateRange Values?, But I can't see any performance improvement in my iPad mini 2, What index did you use on iPad Mini 2 to improve?

I am using 256x256 markers and I fill the recognition is done a little bit faster than with 512x512, but after recognition phase, all seems to be the same

Is it safe to use Metal as a Graphics API? or Auto?

Which are the recommended values for Fork Output Num and Join Num?

The performance on the iPad mini 4 is quite better than mini 2, but why? the hardware difference are not significant: PowerVR G6450 vs PowerVR G6430, Dualcore 1.3 vs Dualcore 1.5, are you sure you are not doing anything?, because profiling the apps, I get exactly the half FPS on iPad mini 2, ~15fps, while on iPad mini 4 is ~30fps
commented Aug 16, 2019 by zhangpengar (3,060 points)
I think it's maybe the difference of default frame rate of camera image capturing.
You can add the following code in ARSession.cs after easyarCamera.setSize.

var n = easyarCamera.supportedFrameRateRangeCount();
for (int k = 0; k < n; k += 1)
    var lower = easyarCamera.supportedFrameRateRangeLower(k);
    var upper = easyarCamera.supportedFrameRateRangeUpper(k);
    if ((lower == 30) && (upper == 30))
        UnityEngine.Debug.Log("setFrameRateRange: " + lower.ToString() + " " + upper.ToString());
commented Aug 16, 2019 by juvelez (910 points)
Well I did exactly what you said and I get exactly 12fps:

The only way I achieve a performance improvement is using Metal or Auto in Graphics API, if I use OpenGLES2 or 3 I get 12fps, but the problem with metal is the recognition became unstable.
commented Aug 18, 2019 by juvelez (910 points)
Due to the information on your instructions to setup EasyAR on Unity where you indicate that OpenGLES2 must be included on the Graphics API are the doubts about using the non opengl APIs.

It would be pretty useful for us to be sure that any non-opengl graphics api can be used, and to solve issues presented when those apis are used.

In my case what happens is that the image recognition become unstable when the camera is approached toward the marker, somehow framerate drops from 30fps to less than 5, and some time later it recovers when camera is far again, or losing the target then found it again helps sometimes for this recovery.
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.