Using Android Camera2, I want to use a region to ignore the top 25% of the image when computing the exposure. I'm using this:
// 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(); }
And it's working on my Nexus 5X. But on a Samsung Galaxy Note 5 (and, I guess, on all Samsung devices), it doesn't work, my area is ignored.
I saw this question: Android Camera2 API - Set AE-regions not working, with the op saying that he managed to get it working by using the Samsung SDK. I'd really prefer to avoid that.
Does someone managed to get the AE regions working with Samsung devices?