如何更改android中的whiteBalance增益值?

我想获取当前增益的值并更改 RGB 增益的值。

在 iOS 中,Apple提供了 setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains:completionHandler.

- (void)setWhiteBalanceGains:(AVCaptureWhiteBalanceGains)gains
{
  NSError *error = nil;
  
  if ( [self.captureDevice lockForConfiguration:&error] ) {
    AVCaptureWhiteBalanceGains normalizedGains = [self normalizedGains:gains];
    [self.captureDevice setWhiteBalanceModeLockedWithDeviceWhiteBalanceGains:normalizedGains completionHandler:nil];
    [self.captureDevice unlockForConfiguration];
  }
  else {
    NSLog( @"Could not lock device for configuration: %@", error );
  }
}

- (AVCaptureWhiteBalanceGains)normalizedGains:(AVCaptureWhiteBalanceGains) g
{
  AVCaptureWhiteBalanceGains gains = g;
  gains.redGain = MAX(gains.redGain, 1.0f);
  gains.greenGain = MAX(gains.greenGain, 3.0f);
  gains.blueGain = MAX(gains.blueGain, 18.0f);
  
  return gains;
}

我们如何使用cameraX在android中实现这一点?

COLOR_CORRECTION_GAINS

COLOR_CORRECTION_MODE

我已经检查了有关通道控制的文档。但是我们如何使用新控件更改色彩校正并重置 cameraX 预览?

以上是如何更改android中的whiteBalance增益值?的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>