Status Update
Comments
ch...@google.com <ch...@google.com>
gu...@gmail.com <gu...@gmail.com> #2
ch...@google.com <ch...@google.com> #3
Please restart the device and check for this issue on the latest software build. If the issue is still reproducible please share the bugreport(to be captured immediately after resolving the issue) and screenrecord of the issue.
Android bug report (to be captured after reproducing the issue)
For steps to capture a bug report, please refer:
Alternate method Navigate to “Developer options”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Screen Record of the Issue Please capture screen record or video of the issue using following steps: adb shell screenrecord /sdcard/video.mp4 Subsequently use following command to pull the recorded file: adb pull /sdcard/video.mp4 Attach the file to this issue.
ch...@google.com <ch...@google.com> #4
(Note: It is the build when sending this report. For exact build reference, please see the attached bugreport.)
This bug persists with the latest build
Debugging information
Google Play services
com.google.android.gms
Version 225014044 (22.50.14 (190400-499278674))
System App (Updated)
Android System WebView
com.google.android.webview
Version 541408544 (109.0.5414.85)
System App (Updated)
Network operator: Fido
SIM operator: Fido
Filed by Android Beta Feedback. Version (Updated): 2.31-betterbug.external_20221207_RC04
To learn more about our feedback process, please visit
et...@google.com <et...@google.com> #5
ch...@google.com <ch...@google.com>
da...@gmail.com <da...@gmail.com> #6
Please restart the device and check if the issue persists?
ch...@google.com <ch...@google.com> #7
to...@repsly.com <to...@repsly.com> #8
The issue has been fixed and it will be available in a future build.Please refer the release notes link
wu...@google.com <wu...@google.com> #9
Hello, the new api is targeted to be added in the next version 1.3.0, so it's not supported in 1.2.0-rc01. Please keep following up with our latest releases. Thanks!
to...@repsly.com <to...@repsly.com> #10
wu...@google.com <wu...@google.com> #11
Since it was about adding new api to the library, it has to go out with alpha version. The next alpha version is 1.3.0-alpha01 which will be launched soon, but this feature is not confirmed to go with this one. Please keep following with the latest 1.3.0 releases, and we will update the status here. Thanks.
[Deleted User] <[Deleted User]> #12
ch...@google.com <ch...@google.com> #13
Some related changes were merged but we're still refining the API and will do the API review. I'll update the issue status as Fixed
once API review is done. Then, the next release after status is updated as Fixed
will contain the solution.
ta...@gmail.com <ta...@gmail.com> #14
wu...@google.com <wu...@google.com> #15
Hello, thanks for asking. This is still work in progress.
sa...@clearquote.io <sa...@clearquote.io> #16
It is really frustrating to see that such high priority issue is still not being taken care
At least provide us with some workaround till you guys are working on this
Somehow, all we want is to capture a Hi-Res Maximum possible resolution image from the camera hardware
Current CameraX API fails on some devices, it captures an image of 1440 X 1080 image on Samsung Galaxy M32 device
Same config is used as provided
ch...@google.com <ch...@google.com> #17
Hi,
We're still doing the final design review for the API to provide the capability to capture high resolution images. The plan is to enable this before version 1.3.0 enters the beta stage.
We do not have M32 device in our lab. I want to clarify with you for some questions.
-
I searched and checked M32 specs
. It has a 64MP camera device. OEMs might have their private implementation to support capturing still images that match the highest resolution the camera can support. But they might not allow those resolutions being accessed by Camera2 public API. In that case, CameraX can't support to capture images with that high resolutions.here 1.1 What is the highest resolution that you can capture still image by the device's native app?
1.2 Could you install and run the attached CheckMaximumResolution.apk to see whether the device exposes the ultra high resolutions to Camera2 API users? (You might see "Has maximum resolution map:
true
orfalse
") -
Usually, even if high resolution capture is not supported, recent Samsung devices can support to capture 12MP still images which are larger than 1440x1080. I'll need more info to clarify why the captured still images resolution is only 1440x1080. You might have provided your config settings somewhere but not in the issue. Could you provide it again here? Thanks.
sa...@clearquote.io <sa...@clearquote.io> #18
Almost all the screens of our app uses camera hardware, either stock camera or custom cameraX API implementation
In development, staging we had very limited set of devices (break up is provided below, please check). Our need is to get 4K (4160 X 3120) images out of device's camera, We are okay about 3K (3264 X 2448) images as well.
Below observations are In sync with the images captured by native camera
POCO F1 - 4032 X 3024
Samsung Galaxy S20 - 4032 X 3024
Samsung Galaxy M33 - 4080 X 3060
Motorola Edge 30 Fusion - 4096 X 3072
Samsung Galaxy M31 - 4624 X 3468
Honor 7C - 4160 X 3120
Redmi Note 7 Pro - 8000 X 6000 (Weird to see the cameraX output, whereas native camera app is giving 4160 X 3120)
Below mentioned all device native camera is giving ~4K resolution images, but not cameraX implementation
Realme 8 - 3264 X 2448
OPPO K10 - 3264 X 2448
Redmi 9i - 3264 X 2448
OnePlus 10R - 3264 X 2448
vivo Y20t - 3264 X 2448
These are our testing observations
Regarding configurations we used - Configuration is exactly as same as provided by
After all this testing we deployed our app and now client is using the Galaxy M32 device where we are getting 1440 X 1080 resolution images :(
Please let me know if you need any further assistance
dt...@gmail.com <dt...@gmail.com> #19
Sony Xperia XZ2, XZ2 Compact, XZ2 Premium and XZ3 are also affected as well as many other devices running LineageOS (because Aperture - which is the default camera app - uses CameraX). All of them (XZ2, XZ2 Compact, XZ2 Premium and XZ3) having a main camera resolution of 19MP. With the devices native camera app back on Android 10 it was possible to get images in that high resolution. Now, with CameraX it's only possible to get 3264x2448 (7.99 MP). I've also attached screenshots from CheckMaximumResolution.apk as well as output of adb shell dumpsys media.camera
). Please let me know if you need further assistance.
ch...@google.com <ch...@google.com> #20
For
Our test lab doesn’t have the following devices: Realme 8 - 3264 X 2448 OPPO K10 - 3264 X 2448 Redmi 9i - 3264 X 2448 OnePlus 10R - 3264 X 2448 vivo Y20t - 3264 X 2448 But I think these devices will be able to capture ~4K images once this buganizer issue is fixed by supporting the resolutions retrieved from StreamConfigurationMap#getHighResolutionOutputSizes().
But for the M32 device issue, it might be a different problem. Without any target resolution setting, ImageCapture will capture images of the maximum resolution retrieved from StreamConfigurationMap#getOutputSizes(). I can’t get any idea why it will take an image with only 1440x1080 on the Samsung Galaxy M32 device. Is it possible that your client can install the CheckMaximumResolution.apk to see what are the output sizes the device has? If possible, please also install the attached CameraXBasic_AspectRatio_4_3.apk to take a picture and see what the size is. It is a little weird if the problem (size of 1440x1080) only happens on M32 but not other devices.
Thanks.
ch...@google.com <ch...@google.com> #21
For
According to the screenshots, the devices do have high resolution output sizes. Therefore, your app will be able to capture high resolution images once the new API is exposed to allow the apps to select those high resolution output sizes.
mi...@gmail.com <mi...@gmail.com> #22
ch...@google.com <ch...@google.com> #23
Thanks for providing the information.
I want to confirm that the issue actually happens on a Samsung A32 device but not a Samsung M32 device?
In
According to the supported resolutions list of A32 device, 1440x1080 is the largest JPEG format supported output sizes retrieved by StreamConfigurationMap#getOutputSizes() for the back camera. Therefore, it is selected. The larger 4:3 resolutions (4000x3000 or 2560x1920) can only be selected when CameraX expose the new API to support high resolution sizes retrieved by StreamConfigurationMap#getHighResolutionOutputSizes().
FYI, about the high resolution sizes definition, please see the javadoc description
Get a list of supported high resolution sizes, which cannot operate at full BURST_CAPTURE rate.
This includes all output sizes that cannot meet the 20 fps frame rate requirements for the BURST_CAPTURE capability. This does not include the stall duration, so for example, a JPEG or RAW16 output resolution with a large stall duration but a minimum frame duration that's above 20 fps will still be listed in the regular getOutputSizes(int) list. All the sizes on this list that are less than 24 megapixels are still guaranteed to operate at a rate of at least 10 fps, not including stall duration. Sizes on this list that are at least 24 megapixels are allowed to operate at less than 10 fps.
For a device that does not support the BURST_CAPTURE capability, this list will be null, since resolutions in the getOutputSizes(int) list are already not guaranteed to meet >= 20 fps rate requirements. For a device that does support the BURST_CAPTURE capability, this list may be empty, if all supported resolutions meet the 20 fps requirement.
Depending on OEM's implementation, A32 back camera supports BURST_CAPTURE but those higher resolutions can't meet 20 fps requirement. Therefore, those resolutions are put in the high resolution list, although the similar size resolutions on the other devices might be put in the normal output sizes list.
mi...@gmail.com <mi...@gmail.com> #24
Thanks and hopefully we'll soon see the updated CameraX. In my case it's quite important as I'm using it for document scanning purposes where resolution really counts.
sa...@clearquote.io <sa...@clearquote.io> #25
using CameraX API, captured images resolution is restricted to 1440 X 1080
We could not find M32 device in our testing team, that is why I could not share the maximum resolution screenshot
ch...@google.com <ch...@google.com> #26
Thanks for your clarifications.
I searched the specs of Samsung A32 and M32 devices (
PLATFORM
OS Android 11, upgradable to Android 13, One UI 5
Chipset Mediatek MT6769V/CU Helio G80 (12 nm)
CPU Octa-core (2x2.0 GHz Cortex-A75 & 6x1.8 GHz Cortex-A55)
GPU Mali-G52 MC2
MAIN CAMERA
Quad 64 MP, f/1.8, 26mm (wide), 1/1.97", 0.7µm, PDAF
8 MP, f/2.2, 123˚, (ultrawide), 1/4.0", 1.12µm
2 MP, f/2.4, (macro)
2 MP, f/2.4, (depth)
Features LED flash, panorama, HDR
Video 1080p@30fps
ch...@google.com <ch...@google.com> #27
The high resolution output sizes can be supported by the new
to...@repsly.com <to...@repsly.com> #28
"Dependency 'androidx.camera:camera-video:1.3.0-rc01' requires libraries and applications that
depend on it to compile against version 34 or later of the
Android APIs.
:app is currently compiled against android-33.
Also, the maximum recommended compile SDK version for Android Gradle
plugin 8.1.0 is 33.
Recommended action: Update this project's version of the Android Gradle
plugin to one that supports 34, then update this project to use
compileSdk of at least 34.
Note that updating a library or application's compileSdk (which
allows newer APIs to be used) can be done separately from updating
targetSdk (which opts the app in to new runtime behavior) and
minSdk (which determines which devices the app can be installed
on).
"
I'm using AS Giraffe 2022.3.1 Patch 1 and:
- Target SDK 33
- Min SDK 26
- 8.1.0 Gradle plugin version
- 8.0 Gradle version
- Kotlin version 1.8.20
- KTX version 1.10.1
How is it possible that for a "release candidate" you have a dependency on an SDK (API 34, OS 14) that isn't out yet and is still in beta
ch...@google.com <ch...@google.com> #29
Thanks for the question. Please refer to
to...@repsly.com <to...@repsly.com> #30
hz...@gmail.com <hz...@gmail.com> #31
This works great for built-in cameras. CameraX now works with USB cameras. This is fantastic. I wonder why CameraX does not detect high resolutions for USB cameras. I have tested two USB cameras and had the same issue for both of them.
The two attached screenshots show 5 resolutions recognized by CameraX and the 5 resolutions and 10 higher resolutions recognized by UVCCamera(
ch...@google.com <ch...@google.com> #32
Hi,
May I know which CameraX API you used to list the supported output sizes for each format in the screenshot?
Could you try to specify a
hz...@gmail.com <hz...@gmail.com> #33
Thank you for your prompt response. Yes, I did use PREFER_HIGHER_RESOLUTION_OVER_CAPTURE_RATE:
ResolutionSelector resolutionSelector = new ResolutionSelector.Builder()
.setAllowedResolutionMode(ResolutionSelector.PREFER_HIGHER_RESOLUTION_OVER_CAPTURE_RATE) // Desired high resolution (1080p)
.setResolutionStrategy(ResolutionStrategy.HIGHEST_AVAILABLE_STRATEGY)
.build();
...
preview = previewBuilder.setResolutionSelector(resolutionSelector).build();
I use both StreamConfigurationMapCompat.getOutputSizes and StreamConfigurationMapCompat.getHighResolutionOutputSizes to get the resolutions. I iterate through all ImageFormat values. I have tested three different USB cameras and get three different results. Two have the retrieved resolutions capped at 1280x960 and one has only 640x480 despite having lots of high resolutions. I understand supporting external USB cameras is relatively new. We really hope the improvement will continue so that we can switch to CameraX completely.
ch...@google.com <ch...@google.com> #34
Hi,
The UVCCamera project accesses the camera attributes via UVC protocol. But CameraX is developed on top of Camera2 API. This should be the reason to cause the different supported sizes between UVCCamera and CameraX. Possibly to make sure that all Camera2 API can work well, it results in that only fewer supported output sizes returned by the Camera2 API. Could you directly retrieve those webcams'
hz...@gmail.com <hz...@gmail.com> #35
I have been using CameraManagerCompat because I thought Compat versions are
usually better. Could you give me a quick tip about which one is the best
for me to use - CameraManagerCompat or CamreaManager?
ch...@google.com <ch...@google.com> #36
All CameraX Compat classes should be hidden classes. It will be risky for 3P apps to use it since we might make some incompatible changes in CameraX in the future.
For this issue's clarification, using CameraManager is to make sure that we do not have any unexpected implementation in CameraX to cause the issue reported from you.
hz...@gmail.com <hz...@gmail.com> #37
Thank you for the clarification. I replaced CameraManagerCompat with CameraManager and changed other methods accordingly, then used the exact method suggested by you to obtain the resolutions and got the same results as CameraManagerCompat was getting.
CameraManager cameraManager = (CameraManager) getSystemService(CAMERA_SERVICE);
CameraCharacteristics cameraCharacteristics = cameraManager.getCameraCharacteristics(sCameraID);
StreamConfigurationMap streamConfigurationMap = cameraCharacteristics.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
...
private static void retrieveResolutions(
StreamConfigurationMap streamConfigurationMap,
String sFormatName,
int iImageFormat,
StringBuilder sb) {
Size[] aSize = streamConfigurationMap.getOutputSizes(iImageFormat);
if (aSize == null) {
utility.doNothing();
} else {
sb.append(utility.snl).append("\t").append(sFormatName);
for (Size size : aSize) {
sb.append(utility.snl).append("\t").append("\t").append(size);
}
}
aSize = streamConfigurationMap.getHighResolutionOutputSizes(iImageFormat);
if (aSize == null) {
utility.doNothing();
} else {
sb.append(utility.snl).append("\t").append(sFormatName);
for (Size size : aSize) {
sb.append(utility.snl).append("\t").append("\t").append(size);
}
}
}
streamConfigurationMap.getHighResolutionOutputSizes(iImageFormat)
always returns null.
Please feel free to let me know anything I can do to investigate this.
ch...@google.com <ch...@google.com> #38
Thanks for your update. The result should be able to prove that CameraX works correctly (the same supported output sizes as Camera2 API).
BTW, if your app needs to obtain some CameraCharacteristics info, maybe you can use
Sample code:
Camera camera = cameraProvider.bindToLifecycle(lifecycleOwner, cameraSelector);
Camera2CameraInfo camera2CameraInfo = Camera2CameraInfo.from(camera.getCameraInfo());
StreamConfigurationMap map = camera2CameraInfo.getCameraCharacteristic(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
hz...@gmail.com <hz...@gmail.com> #39
Thank you for the tip and clarification. Yes, this method is much simpler to retrieve the resolutions.
I do not know how Camera2 obtains the resolutions. Is it possible that Camera2 will get higher resolutions from UVC Cameras in the future or UVC Cameras need to comply with certain protocols to allow Camera2 to retrieve their high resolutions?
ch...@google.com <ch...@google.com> #40
Sorry that I do not know how Camera2 API decides which UVC cameras' resolutions can be used.
Hi Eddy,
Do you have any info to share for this question? Thanks.
et...@google.com <et...@google.com> #41
The available resolutions depend on the implementation of the device's USB webcam support (the externa camera HAL). If it has a resolution limit built-in, then larger sizes won't be exposed to applications.
Avichal, do we have any limits built-in to the AOSP external camera HAL or might this be because of higher resolutions needing H264 decoding support?
hz...@gmail.com <hz...@gmail.com> #42
Here is how UVCCamera gets all the resolutions(
I got the impression Camera2/CameraX gives high priority to video streaming quality. Unless the decoding is very efficient, high-resolution (e.g., 8MP, 12MP, 16MP) videos can be quite choppy (e.g., 3 or 4 FPS), so I was wondering if Camera2 caps the resolution of external USB cameras to guarantee the video quality.
hu...@gmail.com <hu...@gmail.com> #43
in camerX 1.4.0-alpha5 androidx.camera.core.streamsharing.ResolutionsMerger have a bug:
1.use two usecanse ,preview,imagecapture,and set androidx.camera.effects.OverlayEffect
2.imagecapture and preview set capturemodel to PREFER_HIGHER_RESOLUTION_OVER_CAPTURE_RATE to use the heightresolution
3.then crash
Caused by: androidx.camera.core.internal.CameraUseCaseAdapter$CameraException: java.lang.IllegalArgumentException: No available output size is found for androidx.camera.core.streamsharing.StreamSharingConfig@52e6012. at
androidx.camera.core.streamsharing.ResolutionsMerger.java
private ResolutionsMerger(@NonNull Size sensorSize, @NonNull CameraInfoInternal cameraInfo,
@NonNull Set<UseCaseConfig<?>> childrenConfigs) {
this(sensorSize, childrenConfigs, new SupportedOutputSizesSorter(cameraInfo, sensorSize),
cameraInfo.getSupportedResolutions(INTERNAL_DEFINED_IMAGE_FORMAT_PRIVATE));// should fix it,consider the children usecase of StreamSharing set capturemode PREFER_HIGHER_RESOLUTION_OVER_CAPTURE_RATE to use heightrResolution
}
ch...@google.com <ch...@google.com> #44
Thanks for reporting the issue.
I have created
Description
CAMERAX VERSION: 1.0.0-beta07
DEVICE
Redmi Note 9 Pro 10 api 29
DESCRIPTION:
Hi
I have a problem with the CameraX capture image resolution. Using CameraX I am not able to capture images at device default and high resolutions.
When I capture images through my phone using a system camera then image resolutions are 3000x4000. The device also supports capturing images in 6000x8000 resolution in high-resolution mode.
But using CamreaX I can capture image max at 2448x3264.
//Ouput size
streamConfigurationMap.getOutputSizes(ImageFormat.JPEG);
3840x2160|3264x2448|3200x2400|2688x1512|2608x1960|2592x1944|2592x1940|2400x1080|2340x1080|2304x1728|2160x1080|1920x1440|1920x1080|1600x1200|1560x720|1440x1080|1440x720|1280x960|1280x768|1280x720|1024x738|1024x768|800x600|800x480|720x480|640x480|640x360|352x288|320x240|176x144
streamConfigurationMap.getHighResolutionOutputSizes(ImageFormat.JPEG)
4000x3000|8000x6000
// Output image resolution 2448x3264 for the below config.
ImageCapture.Builder()
.setCaptureMode(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY)
.setTargetAspectRatio(AspectRatio.RATIO_4_3) //output image resolution 2448x3264
.setTargetRotation(Surface.ROTATION_0)
.build();
I would expect the output image resolution should be 6000x8000 for the above configuration.
// Output image resolution 2448x3264 for the below config.
ImageCapture.Builder()
.setCaptureMode(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY)
.setTargetResolution(new Size(3000, 4000)) // not working, still output at 2448x3264
.setTargetRotation(Surface.ROTATION_0)
.build();
I would expect the output image resolution should be 3000x4000 for the above configuration.