arcore-android-sdk
arcore-android-sdk copied to clipboard
autofocus not working in pixel6
SPECIFIC ISSUE ENCOUNTERED
Hello, I turned on auto focus in my app, and the focus model I got was auto, but the image I got are still blurry. Is there any way to make the image clearer? Here is my code: mSession = new Session(this); Config config = mSession.getConfig(); config.setFocusMode(Config.FocusMode.AUTO); Log.i("focus", "focus:"+configuration.getFocusMode()); Out:I/focus: focus:AUTO
Here is my image: image
VERSIONS USED
Android Studio: 4.2.1 ARCore SDK for Android: 1.28.0 Device manufacturer, model, and O/S: google Pixel6 ,Android version 12 Google Play Services for AR (ARCore):1.28.212840293 Output of adb shell getprop ro.build.fingerprint: google/oriole/oriole:12/SD1A.210817.036/7805805:user/release-keys
STEPS TO REPRODUCE THE ISSUE
WORKAROUNDS (IF ANY)
ADDITIONAL COMMENTS
When I use version 1.22 auto focus is normal and the image i got is clear. May I ask is there a problem with auto focus in versions after 1.22
Having the same issue here. I noticed putting the app in the background and coming back "fixes" the issue.
Other workarounds:
- For me cleaning up Google Play Services for AR data fixed the issue. Rebooting the device or forcing stop the service makes the issue appear again.
- when creating the ARCore Session, call resume(), pause() and resume() again.
still seeing this issue in AR core v1.30.
I am having this same issue on other devices: Pixel3, Galaxy S22.
Using ARcore 1.30.0
EDIT: workaround with resume/pause/resume fixes the issue for me too:
// NDK no delay between function calls
ArSession_resume(_arSession);
ArSession_pause(_arSession);
ArSession_resume(_arSession);
Still exists with v1.31. Annoying...
Still occurring with 1.36.0. The trick with resume / pause / resume still works.
Still occurring with 1.36.0. It's maddening, why not expose a method of ARSession for manual focus...
@mizhoux hopefully the resume/pause/resume workaround also works for you.
ADDITIONAL INFORMATION The issue also happens when using WebXR on the web. In which case AFAIK it's not possible to apply the resume/pause/resume workaround.
It's also reproducible in any of the AR samples from https://immersive-web.github.io/webxr-samples/. Tested on Chrome Android 112.0.5615.47 on a Samsung Galaxy S21 (Android 13).
@PauGuillamon Thanks for filling the hole, the trick 'resume/pause/resume' also works for me.
Having the same issue here. I noticed putting the app in the background and coming back "fixes" the issue.
Other workarounds:
* For me cleaning up Google Play Services for AR data fixed the issue. Rebooting the device or forcing stop the service makes the issue appear again. * when creating the ARCore Session, call resume(), pause() and resume() again.
The resume(), pause(), resume() combination worked for me too using version 1.39.0 of the ARCore library. Thanks a lot!