May 2022 (ARCore SDK version 1.31) changes to Depth

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.