Camera Controls

There are several camera settings available for tuning using ZED Explorer or the API.

Selecting a Resolution #

The left and right video frames are synchronized and streamed as a single uncompressed video frame in a side-by-side format.

Resolution for USB Camera (ZED, ZED 2/2i and ZED Mini) #

Video ModeOutput Resolution (side by side)Frame Rate (fps)Field of View
HD2K4416x124215Wide
HD10803840x108030, 15Wide
HD7202560x72060, 30, 15Extra Wide
VGA1344x376100, 60, 30, 15Extra Wide

Resolution for GMSL cameras (ZED X/X Mini) #

Video ModeOutput Resolution (side by side)Frame Rate (fps)Field of View
HD12003840x120060, 30, 15Wide
HD10803840x108060, 30, 15Wide
SVGA1920x600120, 60, 30, 15Wide

You can change video resolution and framerate in ZED Explorer or use the API.

Selecting an Output View #

The ZED outputs images in different formats. You can select between rectified, unrectified and grayscale images:

  • Left view
  • Right view
  • Side-by-side view
  • Left or Right Unrectified
  • Left or Right Grayscale

For more information on how to select these views using the API, see Image Capture.

Adjusting Camera Settings #

The ZED camera features an onboard ISP (Image Signal Processor) that performs various image processing algorithms on raw images captured by dual image sensors. Several parameters of the ISP can be adjusted directly from the ZED Explorer application or through the ZED SDK with the sl::VIDEO_SETTINGS:

VIDEO_SETTINGSDescriptionValues
BRIGHTNESSControls image brightness.[0 - 8]
CONTRASTControls image contrast.[0 - 8]
HUEControls image color.[0 - 11]
SATURATIONControls image color intensity.[0 - 8]
SHARPNESSControls image sharpness.[0 - 8]
GAMMAControls gamma correction.[0 - 8]
GAINControls digital amplification of the signal from the camera sensors.[0 - 100]
EXPOSUREControls shutter speed.
Setting a long exposure time leads to an increase in motion blur.
[0 - 100]
(% of camera frame rate)
AEC_AGCControls if gain and exposure are in automatic mode or not.[0 - 1]
AEC_AGC_ROIControls the region of interest for automatic exposure/gain computation.sl::Rect
WHITEBALANCE_TEMPERATUREControls camera white balance.[2800 - 6500]
WHITEBALANCE_AUTOControls camera white balance automatic mode.[0 - 1]
LED_STATUSControls the status of the camera front LED.
Set to 0 to disable the light, 1 to enable the light.
[0 - 1]
VIDEO_SETTINGSDescriptionValues
SATURATIONControls image color intensity.[0 - 8]
SHARPNESSControls image sharpness.[0 - 8]
GAMMAControls gamma correction.[0 - 8]
GAINControls digital amplification of the signal from the camera sensors.[0 - 100]
AEC_AGCControls if gain and exposure are in automatic mode or not.[0 - 1]
AEC_AGC_ROIControls the region of interest for automatic exposure/gain computation.sl::Rect
WHITEBALANCE_TEMPERATUREControls camera white balance.[2800 - 6500]
WHITEBALANCE_AUTOControls camera white balance automatic mode.[0 - 1]
LED_STATUSControls the status of the camera front LED.
Set to 0 to disable the light, 1 to enable the light.
[0 - 1]
EXPOSURE_TIMEControls the exposure time in μs.Value in μs
ANALOG_GAINControls the real analog gain (sensor) in mDB.[1000-16000]*
DIGITAL_GAINControls the real digital gain (ISP) as a factor.[1-256]*
AUTO_EXPOSURE_TIME_RANGEControls the range of exposure auto control.[66000-19000] µs*
AUTO_ANALOG_GAIN_RANGEControls the range of sensor gain in automatic control.[1000-16000] mdB*
AUTO_DIGITAL_GAIN_RANGEControls the range of digital ISP gain in automatic control.[1-256]*
EXPOSURE_COMPENSATIONControls the Exposure-target compensation made after auto exposure.[0-100] (50 means no compensation)
DENOISINGControls the level of denoising applied to the images.[0-100] (50 means no denoising)

*ANALOG_GAIN, DIGITAL_GAIN, AUTO_EXPOSURE_TIME_RANGE, AUTO_ANALOG_GAIN_RANGE and AUTO_DIGITAL_GAIN_RANGE are defined by the Jetson DTS. Default values are indicated in this table.

For more information on how to adjust camera settings using the API, see Camera Controls.

📌 Note: Camera controls adjust parameters of left and right image sensors in sync. It is not possible to adjust sensor parameters individually.

Manual/Auto Mode #

When camera White Balance, Exposure and Gain are in ‘Auto’ mode, they are automatically adjusted depending on the luminance in the scene.

Tips: In AUTO mode, Exposure level will be increased first, then Gain in order to reduce noise. When Exposure is at it’s maximum level, motion blur is increased. If you need to reduce blur, switch to MANUAL mode and increase Gain before Exposure.

It is also recommended to increase the Gamma settings in low-light environments, as it can provide a considerable light boost while reducing saturated areas.

Using the API #

The ZED API provides low-level access to camera control and configuration. To use the ZED in your application, you will need to create and open a Camera object. The API can be used with two different video inputs: the ZED live video (Live mode) or video files recorded in SVO format with the ZED API (Playback mode).

Camera Configuration #

To configure the camera, create a Camera object and specify your InitParameters. Initial parameters let you adjust camera resolution, FPS, depth sensing parameters and more. These parameters can only be set before opening the camera and cannot be changed while the camera is in use.

// Create a ZED camera object
Camera zed;

// Set configuration parameters
InitParameters init_params;
init_params.camera_resolution = RESOLUTION::HD1080;
init_params.camera_fps = 30;

// Open the camera
err = zed.open(init_params);
if (err != ERROR_CODE::SUCCESS)
    exit(-1);
# Create a ZED camera object
zed = sl.Camera()

# Set configuration parameters
init_params = sl.InitParameters()
init_params.camera_resolution = sl.RESOLUTION.HD1080
init_params.camera_fps = 30

# Open the camera
err = zed.open(init_params)
if err != sl.ERROR_CODE.SUCCESS:
    exit(-1)
// Create a ZED camera object
sl.Camera zed = new sl.Camera(0);

// Set configuration parameters
sl.InitParameters init_parameters = new sl.InitParameters();
init_parameters.resolution = sl.RESOLUTION.HD1080;
init_parameters.cameraFPS = 30;

// Open the camera
sl.ERROR_CODE err = zed.Open(ref init_params);
if (err != sl.ERROR_CODE.SUCCESS)
    Environment.Exit(-1);

InitParameters contains a configuration by default. To see the list of parameters, read the API documentation.

Image Capture #

To capture images from the ZED, specify your RuntimeParameters and call grab() to grab a new frame and retrieveImage() to retrieve the grabbed frame. retrieveImage() lets you select between different views such as left, right, unrectified and grayscale images.

sl::Mat image;
if (zed.grab() == ERROR_CODE::SUCCESS) {
  // A new image is available if grab() returns SUCCESS
  zed.retrieveImage(image, VIEW::LEFT); // Retrieve the left image
}
image = sl.Mat()
if zed.grab() == sl.ERROR_CODE.SUCCESS:
  # A new image is available if grab() returns SUCCESS
  zed.retrieve_image(image, sl.VIEW.LEFT) # Retrieve the left image
sl.Mat image = new sl.Mat();
RuntimeParameters runtimeParameters = new RuntimeParameters();
if (zed.Grab(ref runtimeParameters) == sl.ERROR_CODE.SUCCESS) {
  // A new image is available if grab() returns SUCCESS
  zed.retrieveImage(image, sl.VIEW.LEFT); // Retrieve the left image
}

Adjusting Camera Controls #

Camera settings such as exposure, white balance and more can be manually set at runtime using setCameraSettings(). To change camera resolution and frame rate, use InitParameters.

// Set exposure to 50% of camera framerate
zed.setCameraSettings(VIDEO_SETTINGS::EXPOSURE, 50);
// Set white balance to 4600K
zed.setCameraSettings(VIDEO_SETTINGS::WHITE_BALANCE, 4600);
// Reset to auto exposure
zed.setCameraSettings(VIDEO_SETTINGS::EXPOSURE, VIDEO_SETTINGS_VALUE_AUTO);
# Set exposure to 50% of camera framerate
zed.set_camera_settings(sl.VIDEO_SETTINGS.EXPOSURE, 50)
# Set white balance to 4600K
zed.set_camera_settings(sl.VIDEO_SETTINGS.WHITE_BALANCE, 4600)
# Reset to auto exposure
zed.set_camera_settings(sl.VIDEO_SETTINGS.EXPOSURE, -1)
// Set exposure in manual mode at 50% of camera framerate
zed.SetCameraSettings(sl.VIDEO_SETTINGS.EXPOSURE, 50);
// Set white balance to 4600K
zed.SetCameraSettings(sl.VIDEO_SETTINGS.WHITEBALANCE, 4600);
//Reset to auto exposure
zed.SetCameraSettings(sl.VIDEO_SETTINGS.EXPOSURE, -1);

Camera settings can be retrieved using getCameraSettings(). To get the list of available settings, see the API documentation.

Code Example #

Check out the Camera Control sample on GitHub.