使用Android Camera2时,我想在计算曝光时使用区域忽略图像的前25%。我正在使用这个:Android Camera2 - CONTROL_AE_REGIONS无法在三星设备上工作
// Compute the metering rectangle to ignore the top 25% of the picture:
Rect newRect = new Rect(mActiveArraySize.left, (int) (mActiveArraySize.height() * 0.25), mActiveArraySize.right, mActiveArraySize.bottom);
MeteringRectangle meteringRectangle = new MeteringRectangle(newRect, 1);
MeteringRectangle[] meteringRectangleArr = { meteringRectangle };
// Set the metering rectangle:
mPreviewRequestBuilder.set(CaptureRequest.CONTROL_AE_REGIONS, meteringRectangleArr);
// Set the request:
try { mCaptureSession.setRepeatingRequest(mPreviewRequestBuilder.build(), null, mBackgroundHandler); }
catch (CameraAccessException e) { e.printStackTrace(); }
它在使用我的Nexus 5X。但是在三星Galaxy Note 5上(我想所有的三星设备)都不起作用,我的区域被忽略了。
我看到了这样一个问题:Android Camera2 API - Set AE-regions not working,这位同事说他设法通过使用三星SDK来实现它。我真的希望避免这种情况。
有人设法让AE区域与三星设备一起工作吗?
我有同样的问题。顺便说一句,你是否设置了CONTROL_AE_PRECAPTURE_TRIGGER,CONTROL_AE_MODE,CONTROL_AE_LOCK参数中的任何一个? – Mikhail