May 2022 (ARCore SDK version 1.31) changes to Depth

  • These changes only apply to apps compiled with ARCore SDK version 1.31 or higher.

  • ARCore's depth range has been upgraded from 8.191 meters to 65.535 meters in the May 2022 1.31 release.

  • The Depth API now utilizes all 16 bits per pixel to represent depth for improved functionality.

  • Updating older ARCore SDK apps is recommended to take advantage of the new depth range and functionality.

  • New method names have been introduced in Android (Kotlin/Java), Android NDK (C), and Unity (AR Foundation) to support the updated depth range and image format.

The changes outlined in this document are only applicable to apps compiled with ARCore SDK version 1.31 or higher. Apps compiled with an older version of ARCore will not be affected.

As part of the May 2022 1.31 release, the maximum range of ARCore’s depth has been upgraded from 8.191 meters to 65.535 meters. The Depth API now uses all 16 bits per pixel to represent depth, where previously only 13 bits were used for depth values. Though apps using the following methods in older ARCore SDKs will still work using the previous depth range, we recommend updating them in your codebase for better functionality.

Platform-specific changes

Android (Kotlin/Java)

Previous method names and functionality New method names and functionality
Max range of 8.191 meters Max range of 65.535 meters
Frame.acquireDepthImage() Frame.acquireDepthImage16Bits()
Frame.acquireRawDepthImage() Frame.acquireRawDepthImage16Bits()
Image.getFormat() returns ImageFormat.DEPTH16 Image.getFormat() returns HardwareBuffer.D_16

Android NDK (C)

Previous method names and functionality New method names and functionality
Max range of 8.191 meters Max range of 65.535 meters
ArFrame_acquireDepthImage() ArFrame_acquireDepthImage16Bits()
ArFrame_acquireRawDepthImage() ArFrame_acquireRawDepthImage16Bits()
ArImage_getFormat() returns AR_IMAGE_FORMAT_DEPTH16 ArImage_getFormat() returns AR_IMAGE_FORMAT_D_16

Unity (AR Foundation)

All changes are handled by AR Foundation. When building with ARCore Extensions for AR Foundation version 1.31 or later, AROcclusionManager.TryAcquireEnvironmentDepthCpuImage returns images using the new maximum range of 65.535 meters.