What are some of the api options for the camera for Android to effectively take photos when the user moves the camera?

I am creating an Android application that looks like a motion stop application that is designed to take effective pictures even while driving. I wanted to set a very slow shutter speed and a high aperture to get better shots, especially when the camera is moving, but some responses to the stack overflow suggest that it is not possible to set the shutter speed and aperture (please correct me if I'm wrong here), I don’t I use the camera’s intent, but I create a camera object using startPreview, followed by setCameraParams, and then takePicture.

What are the other camera options in the android api that I could configure to make it effective for the camera in motion? I set SCENE_MODE_SPORTS, and also try to set FOCUS_MODE_CONTINUOUS_PICTURE (which is not supported in my camera, although for verification).

+6
source share
2 answers

Here is the link to the part of the Android Camera API that you need: http://developer.android.com/reference/android/hardware/Camera.Parameters.html

In the camera settings you call:

mCamera = camera; Camera.Parameters params = mCamera.getParameters(); params.setRotation(getCameraOrientation()); params.setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO); params.setFlashMode(Camera.Parameters.FLASH_MODE_ON); mCamera.setParameters(params); 

What you are really interested in is:

 setExposureCompensation(int value) setColorEffect(String value) setAutoExposureLock(boolean toggle) getExposureCompensation() 

Do not forget to unlock AE if you want to use it :)

You should also set it to autofocus in order to take pictures, as it was in my example, and a flash will also help, although it will make you take longer between images.

+5
source

I apologize, but may be useful to others.

To set aperture / shutter speed / iso:

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

params.set ("shutter speed", 9); // depends on the camera, for example. 1 means the longest

params.set ("iso", 200);

+1
source

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


All Articles