简体   繁体   English

如何管理Android中的相机快门速度和光圈?

[英]How manage camera shutter speed and aperture in Android?

I would like to manage camera shutter speed or aperture in Android but I have not found nothing about that. 我想在Android中管理相机的快门速度或光圈,但对此一无所获。

The problem is this one: I have to take a picture in macro mode with flash but with newer smartphones the flash light is too strong and the pictures are almost over exposed. 问题是这样的:我必须在带有闪光灯的微距模式下拍照,但对于较新的智能手机,闪光灯光线太强并且照片几乎曝光过度。 I have tried exposure compensation calls but it is not enough. 我已经尝试了曝光补偿电话,但还不够。

By using the Camera software I notice that the app manages the camera aperture, and it is able to take good macro pictures even though the flash is forced to on, so I think there is a way to do that, can you help me? 通过使用Camera软件,我注意到该应用程序可以管理相机的光圈,即使强制开启闪光灯,它也能够拍摄出优质的微距照片,所以我认为有办法做到这一点,您能帮我吗?

I'm using both Samsung Nexus S and Samsung Galaxy W. The white picture problems does not exist with Samusng Galaxy ACE: in this case seems that there is a kind of an hardware light power calibration before shooting. 我同时使用Samsung Nexus S和Samsung GalaxyW。Samusng Galaxy ACE并不存在白色图像问题:在这种情况下,似乎在拍摄之前已经进行了一种硬件光功率校准。

Thank so much! 非常感谢!

Sorry to bring that to you but this feature is simply not supported and no release date is planned. 很抱歉为您带来此功能,但是该功能仅受支持,并且没有计划发布日期。
See feature/bug report : 查看功能/错误报告:

Modify Shutter speed and aperture of camera 修改相机的快门速度和光圈

Via the Camera 1 API on the Android side it isn't possible to manually set one of the two mentioned parameters directly. 通过Android端的Camera 1 API,无法直接手动设置上述两个参数之一。 Neither the characteristics can be queried via a standardized method, because it isn't supported. 由于不支持,无法通过标准化方法查询这两个特征。

Of course there is a way around, to query or to set such properties via special methods: 当然,有一种方法可以通过特殊方法查询或设置此类属性:

// query all the settings you camera support (API 1)
mCamera.getParameters().flatten();
// set parameters - e.g. aperture
mCamera.getParameters().set("aperture", "80");

But the next thing is, that the specific device must support such a setting, which vary from device to device. 但是接下来的事情是,特定的设备必须支持这样的设置,具体设置因设备而异。 On some devices there can be set certain values and with other you can't and can only use the ''auto'' mode. 在某些设备上可以设置某些值,而在其他设备上则不能设置,只能使用“自动”模式。

Additionally the configuration strings (eg ''aperture'') and the range of the possible values are different on the devices. 此外,设备上的配置字符串(例如“ aperture”)和可能值的范围也不同。 For this reason they developed the Camera 2 API, which is more standardized and supports such functionalities. 因此,他们开发了Camera 2 API,该API更加标准化并支持此类功能。 Additionally it is much easier to set or to query special configurations. 此外,设置或查询特殊配置要容易得多。

Exposure 曝光

Commonly all mobile devices have a built-in Exposure control and is called Auto Exposure (AE) control. 通常,所有移动设备都具有内置的曝光控制,称为自动曝光(AE)控制。 With the AE, the device controls automatically the exposure of the image by default and equalize over or under exposed images. 使用自动曝光,设备默认情况下会自动控制图像的曝光,并均衡曝光图像上方或下方的图像。

The Metering Area (MA) and the Exposure Value (EV) - Compensation could help. 测光区域(MA)和曝光值(EV)-补偿可能会有所帮助。

// Android (API 1)
mCamera.getParameters().setMeteringAreas(List<Camera.Area> meteringAreas);
mCamera.getParameters().setExposureCompensation(int value);

Sorry it's late but might be helpful for others 抱歉,已经晚了,但可能会对其他人有所帮助

To set aperture: 设置光圈:

Camera.Parameters params = camera.getParameters(); Camera.Parameters参数= camera.getParameters();

params.set("mode", "m"); params.set(“ mode”,“ m”);

params.set("aperture", "28"); params.set(“ aperture”,“ 28”); //can be 28 32 35 40 45 50 56 63 71 80 on default zoom //默认缩放为28 32 35 40 45 50 56 63 71 80

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM