CameraCharacteristics SENSOR_INFO_EXPOSURE_TIME_RANGE gives wrong values

516 views Asked by At

I am using SENSOR_INFO_EXPOSURE_TIME_RANGE to calculate the range of supported exposure time.

I tested this in Huawei P30 Pro and it seems like this API is giving wrong values(10000 - 1000000000).Camera2 API response

But when I use the built in camera app's pro mode, there I can set exposure value to 30s which is really larger than what is provided by the API. In built camera app's pro mode

Can anyone help me with this? How to get correct values for the range of supported exposure durations?

1

There are 1 answers

0
Zinna On

As Camera algorithms are defined differently on different phone models and manufactures, for Huawei Mate30 Pro, please use HMS camera kit API to get the calculated exposure range instead of using Android Camera2 native API:API example is as follows, then you will see the exposure range returned as : 1/4000-30s.

mMode.getModeCharacteristics() .getParameterRange(RequestKey.HW_PRO_SENSOR_EXPOSURE_TIME_VALUE)

For more detailed info. on how to integrate HMS camera Pro. Mode, please refer to HMS Camera Engine Developer’s Guide:

Please note: HMS Camera Engine SDK is currently only available on HMS phones.