How can I take a picture with the depth camera? Many phones - such as my Nokia 7.1 - now come with depth cameras and other auxiliary cameras built-in.
For example, my Nokia 7.1 has a front &amp; back facing camera as you might expect, but also has a depth camera listed in the specifications:

(link to full specs)
With this in mind, I'd like to be able to take a picture with the depth camera on my phone. Unfortunately though, it doesn't show up if I press the switch camera button in the default camera app - that just switches between the front and back facing cameras.
I've also tried a 3rd party camera app (Open Camera) to no effect.
How can I take a picture with the depth camera directly, and save it as a JPEG file?
While the Nokia 7.1 has a 'depth' camera. It is unclear if the 5MP camera has been exposed to developers (doubtful) or is part of the overall camera system for image enhancement (more likely).
On the other hand a phone like Samsung S10 5G does have a 0.3 MP, TOF 3D, (depth) sensor accessible to Android app developers.
When referring to depth, its not an hi-res image that a user can look at, but a feature that a camera app developer can take advantage of when the hardware supports it.
For Android developers in the Camera2 API there is REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT
Which uses DEPTH16 Android Image format.
For the more technically inclined there is a Medium post on Working with the 3D Camera on the Samsung S10 5G where the author goes into how to use the 3D camera data.
A key point from the article is that the resolution of the DOF is much lower than any visible light image.

The ToF Camera
The front-facing ToF sensor on the Samsung S10 5G is a Sony IMX316. It outputs frames in the DEPTH16 image format with a resolution of 240x180. It has a 75° field of view, which roughly matches the S10 5G’s front-facing camera’s field of view of 80°.

As you can see in the article, the author is using the depth of field image data for bokeh or background blur as each pixel is a depth value and a confidence level. The author also has to apply a variety of techniques to the DEPTH16 data as it appear to be quite noisy.
Those so inclined can get the author's source code here: https://github.com/plluke/tof