diff options
Diffstat (limited to 'apps/CameraITS/pymodules/its/caps.py')
-rw-r--r-- | apps/CameraITS/pymodules/its/caps.py | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/apps/CameraITS/pymodules/its/caps.py b/apps/CameraITS/pymodules/its/caps.py index 08817cc..6caebc0 100644 --- a/apps/CameraITS/pymodules/its/caps.py +++ b/apps/CameraITS/pymodules/its/caps.py @@ -13,6 +13,7 @@ # limitations under the License. import unittest +import its.objects def full(props): """Returns whether a device is a FULL capability camera2 device. @@ -88,6 +89,28 @@ def raw(props): return props.has_key("android.request.availableCapabilities") and \ 3 in props["android.request.availableCapabilities"] +def raw16(props): + """Returns whether a device supports RAW16 output. + + Args: + props: Camera properties object. + + Returns: + Boolean. + """ + return len(its.objects.get_available_output_sizes("raw", props)) > 0 + +def raw10(props): + """Returns whether a device supports RAW10 output. + + Args: + props: Camera properties object. + + Returns: + Boolean. + """ + return len(its.objects.get_available_output_sizes("raw10", props)) > 0 + def sensor_fusion(props): """Returns whether the camera and motion sensor timestamps for the device are in the same time domain and can be compared direcctly. @@ -101,6 +124,34 @@ def sensor_fusion(props): return props.has_key("android.sensor.info.timestampSource") and \ props["android.sensor.info.timestampSource"] == 1 +def read_3a(props): + """Return whether a device supports reading out the following 3A settings: + sensitivity + exposure time + awb gain + awb cct + focus distance + + Args: + props: Camera properties object. + + Returns: + Boolean. + """ + # TODO: check available result keys explicitly + return manual_sensor(props) and manual_post_proc(props) + +def compute_target_exposure(props): + """Return whether a device supports target exposure computation in its.target module. + + Args: + props: Camera properties object. + + Returns: + Boolean. + """ + return manual_sensor(props) and manual_post_proc(props) + class __UnitTest(unittest.TestCase): """Run a suite of unit tests on this module. """ |