Before setting any parameters to CaptureRequest.Builder
I checked that default control scene mode is not disabled
Timber.d("captureRequestBuilder sceneMode ${get(CaptureRequest.CONTROL_SCENE_MODE)} == ${CameraMetadata.CONTROL_SCENE_MODE_DISABLED}")
Timber.d("captureRequestBuilder mode ${get(CaptureRequest.CONTROL_MODE)} == ${CameraMetadata.CONTROL_MODE_AUTO}")
captureRequestBuilder sceneMode 1 == 0
captureRequestBuilder mode 1 == 1
CONTROL_SCENE_MODE_DISABLED = 0;
CONTROL_SCENE_MODE_FACE_PRIORITY = 1;
Why CONTROL_SCENE_MODE_FACE_PRIORITY
is default control scene mode for Camera2?
And what should I set instead if I use Camera2 for a dashboard camera app (video recorder for cars)? It's definitely should not be face recognition on the road...
I thought default scene would be disabled until developer set it explicitly...
All possible values (of course those scene modes may not be supported all by devices):
In most use cases, it's best to leave it to FACE_PRIORITY if the phone uses that as the default.
That mode allows the camera metering to make people's faces look as good as possible - it does not do face recognition, just face detection. So it finds where there are faces, and tries to make sure those areas are well-lit and focused on.
Bu if you want to, you can turn it off by just turning off scene mode entirely, by setting CONTROL_MODE to AUTO instead of USE_SCENE_MODE. When set to AUTO, the value of CONTROL_SCENE_MODE is ignored.