Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How manage camera shutter speed and aperture in Android?

Tags:

android

camera

I would like to manage camera shutter speed or aperture in Android but I have not found nothing about that.

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?

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.

Thank so much!

like image 423
user1187273 Avatar asked Feb 03 '12 10:02

user1187273


2 Answers

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

like image 55
Sephy Avatar answered Sep 22 '22 22:09

Sephy


Via the Camera 1 API on the Android side it isn't possible to manually set one of the two mentioned parameters directly. 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 (e.g. ''aperture'') and the range of the possible values are different on the devices. For this reason they developed the Camera 2 API, which is more standardized and supports such functionalities. 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. 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.

// Android (API 1)
mCamera.getParameters().setMeteringAreas(List<Camera.Area> meteringAreas);
mCamera.getParameters().setExposureCompensation(int value);
like image 38
Manuel Schmitzberger Avatar answered Sep 22 '22 22:09

Manuel Schmitzberger