Hi, I’m working with Note 10+ to get depth(distance) data while taking pictures using Android Camera2 API.
At first, I read this topic, (actually, he tested ToF camera of Huawei P30 Pro)
Is CameraX supported Time Of Flight (TOF) camera?
and I created a project that can be tested on my device by referring to Google’s Camera2Raw sample and that post.
I succeeded in accessing and opening the ToF camera via property CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT, but failed to create a Capture Session with some errors.
- There’s no JPEG format in CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP of ToF camera.(only DEPTH16 format.)
- There’s no output size of SurfaceTexture in CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP of ToF camera.
- Finally failed to create capture session with this message
Stream configuration failed due to: createSurfaceFromGbp:1155: Camera 4: No supported stream configurations with format 0x22 defined, failed to create output stream
So, my questions are,
- Is it possible to get depth(distance) data of ToF Camera by camera2 API or cameraX extension?
- Is it possible to get that data while taking normal pictures?
Regards,
Lee