使用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