How to control camera shutter speed and aperture in Android?

I would like to control my camera’s shutter speed or aperture in Android but I haven’t found anything about it.

The problem is this: I need to take a picture in macro mode using the flash, but with newer smartphones the flash is too strong and the pictures are almost upside down. I tried to expose compensation, but this is not enough.

Using the Camera software, I notice that the application controls the camera aperture, and it can take good macro shots even though the flash is forced on, so I think there is a way to do it, what can you help me?

I use both Samsung Nexus S and Samsung Galaxy W. White. Picture problems do not exist with Samusng Galaxy ACE: in this case it seems that there is some kind of hardware light power calibration before shooting.

Many thanks!

+4
source share
3 answers

Sorry to bring this to you, but this feature is simply not supported and no release date is planned.
See Function / Error Report:

Change camera shutter speed and aperture

+2
source

I apologize, but may be useful to others.

To set the aperture:

Camera.Parameters params = camera.getParameters ();

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

params.set ("aperture", "28"); // may be 28 32 35 40 45 50 56 63 71 80 with default scaling

+1
source

Via the camera API 1 on the Android side, it is impossible to manually set one of the two specified parameters directly. None of the characteristics can be requested using a standardized method, since it is not supported.

Of course, there is a way to request or set such properties using special methods:

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

But the following: a specific device must support a parameter that depends on the device and device. On some devices you can set certain values, but with others you cannot and can only use the "auto" mode.

In addition, the configuration lines (for example, “aperture”) and the range of possible values ​​differ on devices. For this reason, they developed the Camera 2 API, which is more standardized and supports such features. It is also much easier to install or request custom configurations.

Orientation

Typically, all mobile devices have built-in exposure controls and are called AE controls. When using AE, the device automatically controls the exposure of the image by default and is aligned above or below open images.

Measurement area (MA) and exposure value (EV) - compensation can help.

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

Source: https://habr.com/ru/post/1394589/


All Articles