AI-generated Key Takeaways
-
Config.DepthMode selects the desired depth mode, and not all devices support all modes, so you should check for support using
Session.isDepthModeSupported(). -
There are three enum values for Config.DepthMode: AUTOMATIC, DISABLED, and RAW_DEPTH_ONLY.
-
AUTOMATIC mode estimates the best possible depth using hardware and software sources, providing depth for every pixel and adding computational load.
-
DISABLED mode provides no depth information.
-
RAW_DEPTH_ONLY mode provides a raw, mostly unfiltered, sparse depth image and depth confidence image, intended for understanding environmental geometry.
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
AUTOMATIC
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)
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
DISABLED
public static final Config.DepthMode DISABLED
No depth information will be provided. Calling Frame.acquireDepthImage16Bits() throws
IllegalStateException.
public static final Config.DepthMode RAW_DEPTH_ONLY
RAW_DEPTH_ONLY
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.acquireRawDepthImage16Bits()) 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.