三星Galaxy S5相机闪光灯的问题闪光灯、相机、问题、Galaxy

2023-09-05 00:27:23 作者:晚安安入我心 *

我工作的自定义相机功能的应用程序。该相机工作正常在Galaxy S3,S4,HTC,Nexus的,但在S5,所有需要闪光灯的照片显得较暗。照片看起来很好在preVIEW,闪光灯闪光,但什么是传感器捕捉总是太黑了,好像闪光灯从来没有发射过,或闪光灯闪光和图像的捕捉发生在不同的次。闪光灯既可以设置为自动或始终上,具有相同的效果。我试过FOCUS_MODE_CONTINUOUS_PICTURE和FOCUS_MODE_AUTO,具有相同的结果。

I am working on an app with custom Camera functionality. The Camera is working fine on the Galaxy S3, S4, HTC, Nexus, but on the S5, all of the photos that require flash come out dark. The photo looks fine in the preview, the flash fires, but what is captured by the sensor is always too dark, as if the flash never fired off, or the firing of the flash and the capturing of the image happened at different times. The flash can be either set to auto or to always on, with the same effect. I've tried FOCUS_MODE_CONTINUOUS_PICTURE and FOCUS_MODE_AUTO, with the same result.

没有人有任何建议,什么尝试?

Does anyone have any suggestions what else to try?

感谢你, 加里

推荐答案

好像这里有两个不相关的错误,一上的Nexus 4,其他关于三星S5。他们似乎都表现为同样的问题,对采取在低光照条件下闪光灯的照片显得非常黑,但有非常不同的根本原因。

It seems like there are 2 unrelated bugs here, one on the Nexus 4, the other on the Samsung S5. They both seem to manifest as the same issue, pictures taken in low light conditions with the flash on appear extremely dark, but have very different root causes.

Nexus的4断裂与闪光灯一起使用时连续对焦时。这似乎是href="http://stackoverflow.com/a/14761650/1830800">比较知名的问题唯一的解决办法似乎是使用 5英尺)在一个完全黑暗的房间前,我得到一个全黑的画面。 On the Samsung S5, taking pictures in extremely dark conditions with the flash set to FLASH_MODE_ON or FLASH_MODE_AUTO leads to dark or completely black photos. This does not seem to happen on any other device I have tested (Nexus 4, Nexus 5, Samsung S3, Samsung S4) If I take pictures standing close to the objects (~3 ft) in a completely dark room, I get a extremely dark picture with only a few things visible. If I take pictures in front of an open space (>5 ft) in a completely dark room, I get a completely black picture.

我试过被搞乱,重点相关的设置,理由是空地将导致焦点需要更长的时间,从而与拍摄照片的闪光的时间搞乱的第一件事。无论是 FOCUS_MODE_AUTO FOCUS_MODE_CONTINUOUS_PICTURE 似乎帮助的情况下。

The first thing I tried was messing with focus related settings, reasoning that the open space would cause the focus to take longer, thus messing with the timing of taking the picture with the flash. Neither FOCUS_MODE_AUTO nor FOCUS_MODE_CONTINUOUS_PICTURE seemed to help the situation.

我也打过电话 camera.takePicture(...)之前锁定自动曝光和自动最大光圈调整,以确保这些过程中没有扔闪光定时关闭,但是这似乎并没有帮助的。

I also tried locking the auto-exposure and auto-whitebalance adjustments before calling camera.takePicture(...) to make sure those process weren't throwing the flash timing off, but that did not seem to help either.

它仍然感觉像虽然是计时问题,所以我开始在我的应用程序是使用与原生相机应用的参数之间的参数比较差。

It still felt like a timing issue though, so I started comparing the difference in parameters between the parameters my app was using vs. the native camera app.

12-10 15:49:08.659: W/QCameraParameters(265): [FW_DBG] setFirmwareMode: none
12-10 15:49:08.659: W/QCameraParameters(265): [PARM_DBG] Requested preview size 1920 x 1080
12-10 15:49:08.659: W/QCameraParameters(265): [PARM_DBG] dualrecording-hint : 0 m_FaceAE=1 Camera ID=0
12-10 15:49:08.659: W/QCameraParameters(265): [PARM_DBG] Requested video size 1920 x 1080
12-10 15:49:08.659: W/QCameraParameters(265): [PARM_DBG] Requested picture size 2048 x 1152
12-10 15:49:08.659: W/QCameraParameters(265): [PARM_DBG] Requested FOV 62.000000
12-10 15:49:08.659: W/QCameraParameters(265): [PARM_DBG] requested jpeg thumbnail size 512 x 288
12-10 15:49:08.659: W/QCameraParameters(265): [PARM_DBG] set optimal jpeg thumbnail size 512 x 288
12-10 15:49:08.659: W/QCameraParameters(265): [PARM_DBG] rotation val = 90
12-10 15:49:08.659: W/QCameraParameters(265): [PARM_DBG] m_bNoDisplayMode = 0
12-10 15:49:08.659: W/QCameraParameters(265): setZslMode : m_nDualMode=0, mHdrMode=0, mTakeLowlight=0, m_bRecordingHint=0, mAutoLLS=0, m_nDualRecordingHint=0
12-10 15:49:08.659: W/QCameraParameters(265): [PARM_DBG] ZSL = ON
12-10 15:49:08.659: I/QCameraParameters(265): [PARM_DBG] Requested FpsRange Values:(15000, 30000)
12-10 15:49:08.659: W/QCameraParameters(265): [PARM_DBG] flash mode = on
12-10 15:49:08.659: W/QCameraParameters(265): [PARM_DBG] AEC lock = false
12-10 15:49:08.659: W/QCameraParameters(265): [PARM_DBG] AWB lock = false
12-10 15:49:08.659: W/QCameraParameters(265): [PARM_DBG] mHdrMode 0 mTakeLowlight 0
12-10 15:49:08.659: E/QCameraParameters(265): SAMSUNG APPS HDR MODE
12-10 15:49:08.659: W/QCameraParameters(265): [PARM_DBG] live snapshot size 2048 x 1152
12-10 15:49:08.659: E/QCameraParameters(265): [syscamera][setRthdrModes::2831][str::off][prev_str::off]
12-10 15:49:08.659: E/QCameraParameters(265): [syscamera][setPafModes::2863][str::on][prev_str::on]
12-10 15:49:08.659: E/QCameraParameters(265): [syscamera][setDrcModes::2891][str::on][prev_str::on]
12-10 15:49:08.659: W/QCameraParameters(265): updateParameters : X - mCameraId=0, final_rc=0, line=4465
12-10 15:49:08.659: W/QCameraParameters(265): [PARM_DBG] setNumOfSnapshot : nBurstNum = 1, nExpnum = 1

我的应用程序

12-10 15:48:33.109: W/QCameraParameters(265): [PARM_DBG] Requested preview size 1920 x 1080
12-10 15:48:33.109: W/QCameraParameters(265): [PARM_DBG] dualrecording-hint : 0 m_FaceAE=1 Camera ID=0
12-10 15:48:33.109: W/QCameraParameters(265): [PARM_DBG] Requested video size 1920 x 1080
12-10 15:48:33.109: W/QCameraParameters(265): [PARM_DBG] Requested picture size 2048 x 1152
12-10 15:48:33.109: W/QCameraParameters(265): [PARM_DBG] Requested FOV 62.000000
12-10 15:48:33.109: W/QCameraParameters(265): [PARM_DBG] requested jpeg thumbnail size 512 x 288
12-10 15:48:33.109: W/QCameraParameters(265): [PARM_DBG] set optimal jpeg thumbnail size 512 x 288
12-10 15:48:33.109: W/QCameraParameters(265): [PARM_DBG] m_bNoDisplayMode = 0
12-10 15:48:33.109: W/QCameraParameters(265): [PARM_DBG] ZSL = off
12-10 15:48:33.109: I/QCameraParameters(265): [PARM_DBG] Requested FpsRange Values:(10000, 30000)
12-10 15:48:33.109: W/QCameraParameters(265): [PARM_DBG] flash mode = on
12-10 15:48:33.109: W/QCameraParameters(265): [PARM_DBG] AEC lock = false
12-10 15:48:33.109: W/QCameraParameters(265): [PARM_DBG] AWB lock = false
12-10 15:48:33.109: W/QCameraParameters(265): [PARM_DBG] mHdrMode 0 mTakeLowlight 0
12-10 15:48:33.109: W/QCameraParameters(265): [PARM_DBG] live snapshot size 2048 x 1152
12-10 15:48:33.109: E/QCameraParameters(265): [syscamera][setPafModes::2863][str::off][prev_str::off]
12-10 15:48:33.109: E/QCameraParameters(265): [syscamera][setDrcModes::2891][str::off][prev_str::off]
12-10 15:48:33.109: W/QCameraParameters(265): updateParameters : X - mCameraId=0, final_rc=0, line=4465
12-10 15:48:33.109: W/QCameraParameters(265): [PARM_DBG] setNumOfSnapshot : nBurstNum = 1, nExpnum = 1

本机与我的应用程序

在AEC(自动曝光)和AWB(白平衡)行是相同的,所以这是与我之前已经试过一致。唯一的区别是ZSL参数,这是我从来没有听说过的。

Native vs. My App

The AEC (auto exposure) and AWB (white balance) lines are the same, so that's consistent with what I've tried before. The one difference is the ZSL parameter, which I've never heard of before.

谷歌搜索ZSL认为这 SO回答:

Googling for ZSL finds this SO answer:

要实现零快门时滞,摄像头驱动程序必须维护包含全分辨率帧一圆形小缓冲池。拍摄的图像感应器在速度和发送到preVIEW和循环缓冲池(无论是作为原始Bayer或处理/半加工YUV)。当使用presses快门,在圆形水池最新的缓冲器被提取,加工和COM pressed为JPEG。在旧的手机摄像头,传感器不能拍摄全分辨率帧画面,在足够高的帧速率,因此ZSL无法实施。

To achieve zero shutter lag, the camera driver must maintain a small circular buffer pool containing full resolution frames. Images are captured at sensor rate and are sent to preview and to the circular buffer pool (either as raw Bayer or as processed/semi-processed YUV). When the use presses the shutter, the newest buffer in the circular pool is extracted, processed and compressed as JPEG. On older mobile phone cameras, the sensor is not able to capture full resolution frames at a high enough frame rate, and therefore ZSL cannot be implemented.

因此​​,它似乎像快门时滞将导致当图像被捕获闪光灯闪光时之间的时序不匹配。打开ZSL似乎完全消除此问题。它可能应该是在默认情况下,因为闪光灯的行为是没有它坏了,但我不会认为我的呼吸在那一个。

So it seems like the shutter lag causes a timing mismatch between when the flash fires and when the picture is captured. Turning on ZSL seems to eliminate the issue entirely. It should probably be on by default given that flash behaviour is broken without it, but I'm not going to hold my breath on that one.

 
精彩推荐
图片推荐