ImageCapture not taking high resolution images

432 views
Skip to first unread message

Wendelin Tasha

unread,
Feb 11, 2022, 10:28:27 AM2/11/22
to Android CameraX Discussion Group
Hi,
I'm unable to capture high resolution images on a Galaxy A52. The images from CameraX with CAPTURE_MODE_MAXIMIZE_QUALITY are 3264x2448 (8MP), yet the device's camera has 4624x3468 (16MP), which other apps are able to utilize.

StreamConfigurationMap.getOutputSizes(ImageFormat.JPEG) returns [4032x1908, 3840x2160, 3280x2464, 3264x2448, 3264x1836, ...]

and StreamConfigurationMap.getHighResolutionOutputSizes(ImageFormat.JPEG) returns [4624x3468, 4032x3024, 4000x3000]

I've played around with the ImageCapture.Builder, trying the following things
  • .setTargetResolution(new Size(3468, 4624))
  • .setTargetResolution(new Size(4624, 3468))
  • .setTargetRotation(Surface.ROTATION_0) through (Surface.ROTATION_270)
  • no arguments at all, just using the default settings from the builder
  • I've even tried .setCaptureMode(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY) in my despair
I've also tried removing the preview from my use cases (so I'll only have my imageCapture), which didn't work either.

My (stripped down) code is as follows:
Using imageCapture.takePicture(fileOptions, cameraExecutor, ...)
(cameraExecutor is a singleThreadExecutor), this still returns images sized 3264x2448 (low res).

Am I missing something obvious? Or is this a bug?

Charcoal Chen

unread,
Feb 13, 2022, 9:34:43 PM2/13/22
to Wendelin Tasha, Android CameraX Discussion Group
Hi,

CameraX implements the auto-resolution mechanism based on the guaranteed configurations tables in the "Regular capture" section of CameraDevice web doc. The MAXIMUM size is defined according to StreamConfigurationMap#getOutputSizes. It may also take longer time to take a picture with the size retrieved from getHighResolutionOutputSizes(). Therefore, the sizes retrieved from getHighResolutionOutputSizes() can't be selected yet in the current version. We will investigate how to allow the users to select the sizes retrieved from getHighResolutionOutputSizes(). A public issue https://issuetracker.google.com/162121234 has been existing for tracing this issue. Thanks.

--
You received this message because you are subscribed to the Google Groups "Android CameraX Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to camerax-develop...@android.com.
To view this discussion on the web visit https://groups.google.com/a/android.com/d/msgid/camerax-developers/83bbcbf1-2a9c-443f-8242-162a61241d3en%40android.com.
Reply all
Reply to author
Forward
0 new messages