Settings on the Camera

Updated: April 19, 2023

You can configure various settings on the camera to modify the ISO, aperture, shutter speed, framerate, resolution, format, etc.

Before or after you start the viewfinder, you can configure some manual settings (i.e., ISO, shutter speed, white balance, and aperture) on the camera. Most of the manual settings, however, can be set only when the viewfinder is running (i.e., has been started). For information about which settings can be set only after the viewfinder is running, see the Camera Library Reference in this guide.
Note:

As you run your application and make manual setting changes, you may notice that such changes aren't visible for several frames. This is expected due to the latency in the image-processing pipeline. This latency varies from system to system and from camera to camera.

If you configure any of these settings before you call camera_set_vf_mode(), they are lost because this function resets them. For information about setting the viewfinder mode, see the Viewfinder Mode chapter. The settings are also lost whenever you stop and then restart the viewfinder.

To retrieve and configure camera settings, you use functions defined in the camera_3a.h header file. This file contains functions that allow you to:

3A Locked modes

Typically, these functions are used to lock settings on the camera. If you use 3A locked modes, it can lock autofocus, autoexposure, or auto white balance. Depending on the camera, only some settings can be locked. To determine which settings can be locked, call camera_get_3a_lock_modes(), and then based on the lock modes available, determine the combinations of camera settings that can be locked using camera_set_3a_lock().

For example, if you call camera_get_3a_lock_modes(), you might get an array that indicates that all 3A algorithms can be locked independently:
element 0: CAMERA_3A_AUTOFOCUS
element 1: CAMERA_3A_AUTOEXPOSURE
element 2: CAMERA_3A_AUTOWHITEBALANCE
element 3: CAMERA_3A_NONE
Another example would be a camera where autofocus and autoexposure must be locked simultaneously, while auto white balance can be locked independently:
element 0: CAMERA_3A_AUTOFOCUS | CAMERA_3A_AUTOEXPOSURE
element 1: CAMERA_3A_AUTOWHITEBALANCE
element 2: CAMERA_3A_NONE
To lock the mode, you can call camera_set_3a_lock(). To lock multiple modes together, you can logically OR the values together as shown here:
camera_set_3a_lock(cameraHandle, CAMERA_3A_AUTOFOCUS | CAMERA_3A_AUTOEXPOSURE);

Manual camera settings

You can manually set aperture, focus, white balance, shutter speed, exposure modes, and ISO values for the camera, instead of letting the camera automatic modes do it (if available). The advantage of manual settings is they give you more control over the appearance of the image buffers captured from the camera. These manual settings can be set only after you start the viewfinder.

Note: Not all cameras support all available manual settings. To determine which manual exposure settings can be adjusted, you can call camera_get_exposure_modes().