Reputation: 289
I'm developing an app that needs a constant input of unaltered images, so I setup a preview surface to capture images constantly and configured it so I can manually adjust every control.
However, there's just this parameter that's escaping my control and it's the color correcting features. I'm using the TEMPLATE_STILL_CAPTURE and setting the controls as follows:
captureRequest.set(CaptureRequest.CONTROL_AF_MODE, CameraMetadata.CONTROL_AF_MODE_OFF);
captureRequest.set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_CANCEL);
captureRequest.set(CaptureRequest.CONTROL_AWB_LOCK, true);
captureRequest.set(CaptureRequest.CONTROL_AWB_MODE, CameraMetadata.CONTROL_AWB_MODE_OFF);
captureRequest.set(CaptureRequest.CONTROL_AE_LOCK, true);
captureRequest.set(CaptureRequest.CONTROL_AE_MODE, CameraMetadata.CONTROL_AE_MODE_OFF);
captureRequest.set(CaptureRequest.LENS_FOCUS_DISTANCE, numFocus);
captureRequest.set(CaptureRequest.NOISE_REDUCTION_MODE, CameraMetadata.NOISE_REDUCTION_MODE_FAST);
captureRequest.set(CaptureRequest.SENSOR_EXPOSURE_TIME, exposure);
captureRequest.set(CaptureRequest.SENSOR_SENSITIVITY, sensitivity);
captureRequest.set(CaptureRequest.TONEMAP_MODE, CameraMetadata.TONEMAP_MODE_CONTRAST_CURVE);
captureRequest.set(CaptureRequest.TONEMAP_CURVE, tcurve);
captureRequest.set(CaptureRequest.COLOR_CORRECTION_MODE, CameraMetadata.COLOR_CORRECTION_MODE_TRANSFORM_MATRIX);
captureRequest.set(CaptureRequest.COLOR_CORRECTION_TRANSFORM, colorTransform);
captureRequest.set(CaptureRequest.COLOR_CORRECTION_GAINS, rggb);
Later on the CaptureCallback, when I compare the request and the result, I found that on the result, the COLOR_CORRECTION_MODE has changed to COLOR_CORRECTION_MODE_FAST. Is there something I'm missing here?
I'm using a Samsung Galaxy Tab A 2016 (SM-T580), so it is possible that it simply doesn't support it, but I'd rather confirm I'm not just doing something wrong.
Upvotes: 2
Views: 2571
Reputation: 18137
If the device does not support the MANUAL_POST_PROCESSING capability, then COLOR_CORRECTION_MODE_TRANSFORM_MATRIX does not need to be supported.
All devices at the FULL hardware level support MANUAL_POST_PROCESSING, but LIMITED devices don't have to, and LEGACY devices will never support it.
So please check what capabilities are available, to see if you can control the color correction transform on this device.
Upvotes: 3