In this application, AugmentedImageDatabase.addImage(name: String, bitmap: Bitmap) throws an uncaught ImageInsufficientQualityException and therefore crashes when used with this image, while it everything worked fine on previous versions of the Play Services for AR versions.
VERSIONS USED
Android Studio: (unrelated) Android Studio Giraffe | 2022.3.1 Patch 2
ARCore SDK for Android: (unrelated) 1.40.0
Device manufacturer, model, and O/S: (unrelated) Pixel 6 Pro
Google Play Services for AR (ARCore): 1.40.232630293
Output of adb shell getprop ro.build.fingerprint: google/raven/raven:14/UP1A.231005.007/10754064:user/release-keys
Expect a crash with the current 1.40 release of Play Services for AR
WORKAROUNDS (IF ANY)
Catch the ImageInsufficientQualityException exception, but the Augmented Image feature that previously worked could not be re-enabled!
Try to come up with a new marker image that would be "supported", and with enough
ADDITIONAL COMMENTS
The "image quality" reported by arcoreimg.exe eval-img --input_image_path=augmented_image_target.png is 50.
Even though the documentation states that We recommend a quality score of at least 75, a lower bound has never been documented and obviously the image did not changed since.
SPECIFIC ISSUE ENCOUNTERED
A recent version of Google Play Services for AR introduced a regression on one of my application using AR Core:
In this application,
AugmentedImageDatabase.addImage(name: String, bitmap: Bitmap)
throws an uncaughtImageInsufficientQualityException
and therefore crashes when used with this image, while it everything worked fine on previous versions of the Play Services for AR versions.VERSIONS USED
Android Studio Giraffe | 2022.3.1 Patch 2
1.40.0
Pixel 6 Pro
1.40.232630293
adb shell getprop ro.build.fingerprint
:google/raven/raven:14/UP1A.231005.007/10754064:user/release-keys
STEPS TO REPRODUCE THE ISSUE
app-release.apk
or install it directly from the Play StoreWORKAROUNDS (IF ANY)
ImageInsufficientQualityException
exception, but the Augmented Image feature that previously worked could not be re-enabled!ADDITIONAL COMMENTS
The "image quality" reported by
arcoreimg.exe eval-img --input_image_path=augmented_image_target.png
is 50. Even though the documentation states thatWe recommend a quality score of at least 75
, a lower bound has never been documented and obviously the image did not changed since.