arcore-android-sdk icon indicating copy to clipboard operation
arcore-android-sdk copied to clipboard

autofocus not working in pixel6

Open canaee opened this issue 3 years ago • 10 comments

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

canaee avatar Nov 12 '21 02:11 canaee

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

canaee avatar Nov 25 '21 01:11 canaee

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.

PauGuillamon avatar Dec 16 '21 07:12 PauGuillamon

still seeing this issue in AR core v1.30.

kevinylo avatar Mar 04 '22 18:03 kevinylo

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);

maxrd2 avatar May 06 '22 07:05 maxrd2

Still exists with v1.31. Annoying...

gayko1976 avatar Jun 12 '22 12:06 gayko1976

Still occurring with 1.36.0. The trick with resume / pause / resume still works.

AlessandroMulloni avatar Apr 15 '23 21:04 AlessandroMulloni

Still occurring with 1.36.0. It's maddening, why not expose a method of ARSession for manual focus...

mizhoux avatar Apr 20 '23 12:04 mizhoux

@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 avatar Apr 20 '23 12:04 PauGuillamon

@PauGuillamon Thanks for filling the hole, the trick 'resume/pause/resume' also works for me.

mizhoux avatar Apr 21 '23 02:04 mizhoux

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!

MihMihai avatar Nov 02 '23 09:11 MihMihai