Status Update
Comments
wu...@google.com <wu...@google.com>
we...@google.com <we...@google.com> #2
It seems like the CameraXBasic app can get a correct exposure in the Preview and single capture.
Did you set any customized capture option for the single capture? CameraX will default set AE for both preview and capture stream, that will keep the capture and preview in similar exposure result.
el...@zen.ly <el...@zen.ly> #3
Unfortunately the CameraXBasic app is crashing on startup for me, the log is attached, so I cannot confirm if the issue persists on the Pixel 4.
What version of Android are you running on the device? (Maybe it is in the ROM ID you sent me? But I do not know how to extract the API).
I am running Android 10 on the Pixel 4.
As for capture options, we are not using any customized settings. Here is the CameraInit I use
private fun initCamera(lensFacing: LensFacing) {
cameraProvider?.unbindAll()
val cameraSelector = CameraSelector.Builder()
.requireLensFacing(lensFacing.value)
.build()
val resolution = Size(binding.previewView.width, binding.previewView.height)
val previewBuilder = Preview.Builder()
.setTargetResolution(resolution)
val imageCaptureBuilder = ImageCapture.Builder()
.setCaptureMode(ImageCapture.CAPTURE_MODE_MINIMIZE_LATENCY)
.setTargetResolution(resolution)
val videoCaptureBuilder = VideoCapture.Builder()
.setTargetResolution(resolution)
.setAudioSampleRate(44_100)
// Build the viewfinder use case
preview = previewBuilder.build()
imageCapture = imageCaptureBuilder.build()
if (supportsVideoRecording) {
videoCapture = videoCaptureBuilder.build()
}
try {
// Bind use cases to lifecycle
camera = if (supportsVideoRecording) {
cameraProvider?.bindToLifecycle(
CameraLifecycleOwner.get(),
cameraSelector,
preview,
imageCapture,
videoCapture
)
} else {
cameraProvider?.bindToLifecycle(
CameraLifecycleOwner.get(),
cameraSelector,
preview,
imageCapture
)
}
preview?.setSurfaceProvider(binding.previewView.surfaceProvider)
} catch (e: Exception) {
Timber.e(e, "Error initializing camera, video recording enabled: $supportsVideoRecording")
showCameraInitFailed()
}
}
I am now using CameraX version 1.0.0-rc01 so the most recent release, and the exposure issue persists.
we...@google.com <we...@google.com> #4
It seems like the VideoCapture component may be the reason that causes the exposure issue.
The VideoCapture is still in the development stage, it still has some issues and compatibility problems need to be addressed.
Can you try to disable the VideoCapture for testing?
I'm running the app on Android-10, it should be the same build id as you provided. The capture image seems good after removing the VideoCapture.
By the way, I also noticed that the latest CameraXBasic get a crash issue on my phone. You can temporarily rollback the Navigation library version from 2.3.2 -> 2.3.0 (in build.gradle) to fix the issue. We are already contacting the app team to look into this.
el...@zen.ly <el...@zen.ly> #5
I can confirm that disabling video capture solves the issue. Is it possible to forward this somewhere to keep it visible for whenever the work on the VideoCapture use case begins?
Additionally, if you have any insight on the time frame of when it should be improved, would be greatly appreciated.
we...@google.com <we...@google.com> #6
Our team is internally working on an upgrade for the video capture function, the new version will be announced later.
We'd keep this issue to track this symptom and ensure the compatibility issue is fixed in the new version, that would be appreciated if you can have a try on the new one.
le...@google.com <le...@google.com>
wu...@google.com <wu...@google.com>
bu...@google.com <bu...@google.com> #7
wu...@google.com <wu...@google.com> #8
Bugjuggler: wait 2w -> leohuang
bu...@google.com <bu...@google.com> #9
bu...@google.com <bu...@google.com>
wu...@google.com <wu...@google.com>
ch...@google.com <ch...@google.com> #10
This issue has been fixed by Pixel Camera team. I have verified it with internal dev ROM build of Pixel 4 XL. The solution will be included in next OTA of Pixel 4/4 XL. Please stay tuned. Thanks.
Description
CAMERAX VERSION 1.0.0-beta11
ANDROID OS BUILD NUMBER: QQ3A.200805.001
DEVICE NAME: Pixel 4
DESCRIPTION: On specific devices, images are often underexposed or overexposed. This is reproducible 100% of the time on the Pixel 4 by taking a picture of a window facing natural light.
Often pictures are darker than they should be as well.
I have attached screenshots of the preview showing what the viewfinder indicates for the photo, then attached the JPG captured by CameraX.
Other devices we have seen this issue on: samsung SM-N975F, OS Level 29
STEPS TO REPRODUCE:
OBSERVED RESULTS:
Resulting photo is way too bright.
EXPECTED RESULTS:
Photo should match what was seen in the preview
REPRODUCIBILITY: 5 of 5