'How can I tweak my Camera2 API settings to match the quality of the stock camera app?

For my task, I need the highest quality (sharpness specifically) still image capture possible.

However, I am new to the Camera2API and its numerous settings I can adjust. These are the ones I curerently have set:

fullResRequestBuilder.set(CaptureRequest.CONTROL_MODE, CaptureRequest.CONTROL_MODE_AUTO);
fullResRequestBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_EDOF);
fullResRequestBuilder.set(CaptureRequest.JPEG_QUALITY, (byte)100);
fullResRequestBuilder.set(CaptureRequest.NOISE_REDUCTION_MODE, CaptureRequest.NOISE_REDUCTION_MODE_HIGH_QUALITY);
fullResRequestBuilder.set(CaptureRequest.COLOR_CORRECTION_ABERRATION_MODE, CaptureRequest.COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY);
fullResRequestBuilder.set(CaptureRequest.COLOR_CORRECTION_MODE, CaptureRequest.COLOR_CORRECTION_MODE_HIGH_QUALITY);
fullResRequestBuilder.set(CaptureRequest.EDGE_MODE, CaptureRequest.EDGE_MODE_HIGH_QUALITY);

My Reader:

fullQualityReader = ImageReader.newInstance(4608, 2592, ImageFormat.YUV_420_888, 2);

But I am not able to reach the quality of the stock OnePlus 5T camera. Here is a comparison: left is from my app, right is from the stock app.

Side-by-side image comparison

Would appreciate any help in getting to the quality of the stock app or better. Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source