title: Android camera2 custom white balance
body: <p>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.</p>
  
  <p>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:</p>
  
  <pre><code>    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);
  </code></pre>
  
  <p>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? </p>
  
  <p>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.</p>