Camera Controls

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

Selecting a Video Mode

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

Video Mode Output Resolution (side by side) Frame Rate (fps) Field of View
2.2K 4416x1242 15 Wide
1080p 3840x1080 30, 15 Wide
720p 2560x720 60, 30, 15 Extra Wide
WVGA 1344x376 100, 60, 30, 15 Extra Wide

You can change video resolution and framerate in ZED Explorer or using 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 the dual image sensors. Several parameters of the ISP can be adjusted directly from the ZED Explorer app or through the ZED SDK:

Settings Description Values
Resolution Controls camera resolution. HD2K, HD1080,
HD720, VGA
FPS Controls frame rate. 15, 30, 60, 100
Brightness Controls image brightness. [0 - 8]
Contrast Controls image contrast. [0 - 8]
Hue Controls image color. [0 - 11]
Saturation Controls image color intensity. [0 - 8]
Gamma Controls gamma correction. [0 - 8]
Sharpness Controls image sharpness. [0 - 8]
White Balance Controls camera white balance. [2800 - 6500]
Exposure Controls shutter speed.
Setting a long exposure time leads to
an increase in motion blur.
[0 - 100]
(% of camera frame rate)
Gain Controls digital amplification of the
signal from the camera sensors.
[0 - 100]

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() == 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() == 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) == 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.