Status Update
Comments
xi...@google.com <xi...@google.com>
xi...@google.com <xi...@google.com> #2
Thank you for reporting this issue. I can reproduce it on Samsung A3 and J5 Prime. It seems that the original quirk only exists when certain combination of Surface sizes is used. e.g. it no longer exists for 960x720 preview and 1080x1920 analysis, but it will happen again if we add an ImageCapture use case.
To fix this properly, we need the following:
- A table of resolution combinations that causes the quirk. The table also needs to live in camera-core because PreviewView won't have all the info.
- Add an additional transform info to use case outputs. It will be added to SurfaceRequest.TransformationInfo as well as ImageProxy. This additional info will be a Matrix object that indicates the mapping from camera sensor to the output. The current set of transform info, crop rect + rotation, is not expressive enough to handle this.
- In PreviewView, use this info to correct preview.
To implement the fix above, we need to add new internal API to camera-core. Since camera-core is entering stable stage, it's too late to add new API. We will wait for a future minor version to address this.
[Deleted User] <[Deleted User]> #3
I also noticed the preview is stretched on Samsung Galaxy Tab A (2016) SM-T580 (even though there was a related bugfix 169471824). I've checked the CameraXBasic demo app and used:
- camerax version 1.1.0-alpha04 (though also tried 1.0.0 with the same results)
- camera-view 1.0.0-alpha24
You can see that camera preview (camera-preview.jpg) has a different bounds than the actual captured photo.
In my own project, I'm using LifecycleCameraController
with isPinchToZoomEnabled = true
(and image analysis enabled) and I noticed that at default 1x zoom the preview is stretched, but at a certain zoom level >1x, the preview is no longer stretched.
xi...@google.com <xi...@google.com> #4
[Deleted User] <[Deleted User]> #5
I've tried it today on CameraXBasic sample from commit 852767f
, which already has def camerax_version = '1.1.0-alpha04'
and androidx.camera:camera-view:1.0.0-alpha24
Android version 8.1.0
Build number M1AJQ.T580XXS5CTK1
xi...@google.com <xi...@google.com> #6
[Deleted User] <[Deleted User]> #7
I've tried the apk attached above, and it's reproduced as in attached video. The final image seems to contain more vertical space, but less horizontal space (black bars on the left and right).
xi...@google.com <xi...@google.com> #8
We have a test app that help collecting info related to camera quirks. Could you generate a report using the app and upload the zip file to this bug?
If you are interested, the source code of the app can be found in this WIP code change:
[Deleted User] <[Deleted User]> #9
The report is attached, let me know if you need anything else
xi...@google.com <xi...@google.com> #10
Thanks for the report. I am able to repro the issue locally with the same configuration. This bug happens to 4 Samsung models and has some complicated behaviors. We will work with our partner on this.
Description
Please note: This component is for the CameraX API used in Jetpack. Please DO NOT file Pixel Camera issues here.
Please describe your issue and include details such as the version of CameraX you are using and any relevant logs related to your issue.
// If at all possible, capture an Android logcat (https://developer.android.com/studio/command-line/logcat ) when you're experiencing the issue, preferably while the camera is still active.
CAMERAX VERSION (ex - 1.0.0-alpha07)
'androidx.camera:camera-view:1.0.0-alpha24'
CAMERA APPLICATION NAME AND VERSION: (Settings > Apps > (app name) > version)
CameraXbasic (https://github.com/android/camera-samples/tree/master/CameraXBasic )
Commit: 2690075bca44d51e4e37df07273d1f8d7fe9846f [2690075] (2021-04-01 10:07:26)
patch.diff
(attachment)ANDROID OS BUILD NUMBER: (Settings > About > Build number)
R16NW.A320FLXXS9CTL4
DEVICE NAME: (Nexus 5X, Samsung S6, etc)
Samsung Galaxy A3 2017
DESCRIPTION:
I believe this issue is related to https://issuetracker.google.com/issues/180121821 .
There were two fixes applied according the changelog in 1.0.0-alpha23 and 1.0.0-alpha24 for devices:
Samsung Galaxy A3 2017
Samsung J5 Prime
These fixes solved the issue in default CameraX configuration, but the issue still occurs when we call this method:
LIST ANY EXPERIMENTAL FEATURES: (As an example - @ExperimentalCamera2Interop)
STEPS TO REPRODUCE:
OR:
OBSERVED RESULTS: The preview is stretched. See:
CameraX_Samsung_Galaxy_A3_2017.png
EXPECTED RESULTS: The preview should be "normal". See:
CameraX_Google_Pixel_2.png
REPRODUCIBILITY: (5 of 5, 1 of 100, etc)
100%
ADDITIONAL INFORMATION:
Workaround to solve the issue:
OR:
CODE FRAGMENTS (this will help us troubleshoot your issues):
See my workaround based on the existing fix in 'androidx.camera:camera-view:1.0.0-alpha24':