Google is committed to advancing racial equity for Black communities. See how.


public static final enum Config.DepthMode

Selects the desired depth mode. Not all devices support all modes. Use Session.isDepthModeSupported(Config.DepthMode) to find whether the current device and the selected camera supports a particular depth mode.

Inherited Methods

Enum Values


public static final Config.DepthMode AUTOMATIC

On supported devices, the best possible depth is estimated based on hardware and software sources. Available sources of automatic depth are:

  • Depth from motion, using the main RGB camera
  • Hardware depth sensor, such as a time-of-flight sensor (or ToF sensor)
Provides depth estimation for every pixel in the image, and works best for static scenes. Adds significant computational load.

With this mode enabled, Frame.hitTest(MotionEvent) also returns DepthPoint in the output List<HitResult>, which are sampled from the generated depth image for the current frame if available.


public static final Config.DepthMode DISABLED

No depth information will be provided. Calling Frame.acquireDepthImage() throws IllegalStateException.


public static final Config.DepthMode RAW_DEPTH_ONLY

On ARCore supported devices that also support the Depth API, provides a "raw", mostly unfiltered, depth image (Frame.acquireRawDepthImage()) and depth confidence image (Frame.acquireRawDepthConfidenceImage()).

The raw depth image is sparse and does not provide valid depth for all pixels. Pixels without a valid depth estimate have a pixel value of 0.

Raw depth data is also available when AUTOMATIC is selected.

Raw depth is intended to be used in cases that involve understanding of the geometry in the environment.