'ARCore – Raw Depth Data from rear Android depth camera
I can't figure out how can I get raw depth data from my Xiaomi Redmi Note 8 Pro with rear ToF depth sensor.
I've tried:
- Camera2Format from android samples. No results (and I'm not alone)
- get physicalId from rear camera as described in android developers blog. No result.
- ARCore API can't handle depth.
I saw several similar questions (one, two) without answers. Is it so difficult to capture raw depth from depth camera in Android?
Solution 1:[1]
Raw Depth API vs Full Depth API
A few days ago, at Google IO 2021, a new API for ARCore 1.24 was announced – Raw Depth API to addition to existing Full Depth API announced for ARCore 1.18. This brand new API gives you the ability to use Raw Depth data coming from iToF sensor. This data can be retrieved through 16-bit buffer stream, where 13-bit is reserved for depth map
and 3-bit is reserved for confidence map
.
From now ARCore developers can use Raw Depth API for Precise Measurements and for ops on Reconstructed Mesh. On the other hand, Full Depth API is ideally suitable for People/Objects Occlusion and Scene Relighting purposes.
The following table compares three important parameters:
Raw Depth API | Full Depth API | |
---|---|---|
Accuracy | Awesome | Bad |
Coverage | Not all pixels | All pixels |
Distance | 0.5 to 5.0 m | 0 to 8.0 m |
The list of ARCore Depth API supported devices is growing. Pay attention to the last column called Comments
- info about Depth API support is there.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |