0

I'm trying to capture an image using Android Multi Camera API. The problem I'm facing now is that I can not get supported resolutions and prepare output configuration for a specific physical camera.

Google official docs suggests to use MultiResoultionImageReader, here's the link, but MultiResolutionImageReader should be used for a camera device only if the camera device supports multi-resolution output stream by advertising the specified output format in android.hardware.camera2.CameraCharacteristics#SCALER_MULTI_RESOLUTION_STREAM_CONFIGURATION_MAP.

However it's returning null and i'm testing it with Pixel 5 and 6.

val multipleStreamConfigurationMap = mCameraCharacteristics.get(CameraCharacteristics.SCALER_MULTI_RESOLUTION_STREAM_CONFIGURATION_MAP) How can I set a resolution for physical camera?

1 Answers1

0

Most of the physical camera are not exposed directly to app developer. it is exposed via some logical cameraID. You need to check if the device that you are using support logical cameraID or not before using MultiResolutionImageReader

Wasim Ansari
  • 305
  • 1
  • 9
  • Yes, I'm checking the existence of physical camera ids, and opening a wide and optical zoom camera, if they're provided. Unfortunately, most of the devices don't support it, for now I've only tested with Pixel phones.@Wasim Ansari Have you tried setting multi-resolution? – Murodjon Abdukholikov Mar 09 '22 at 23:45