Camera Controls

Open in ClaudeOpen in ChatGPT

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

ZED Explorer

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.

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

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:

ZED Explorer camera parameters

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.[1 - 9]
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]

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

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.

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.

1// Create a ZED camera object
2Camera zed;
3
4// Set configuration parameters
5InitParameters init_params;
6init_params.camera_resolution = RESOLUTION::HD1080;
7init_params.camera_fps = 30;
8
9// Open the camera
10err = zed.open(init_params);
11if (err != ERROR_CODE::SUCCESS)
12 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.

1sl::Mat image;
2if (zed.grab() == ERROR_CODE::SUCCESS) {
3 // A new image is available if grab() returns SUCCESS
4 zed.retrieveImage(image, VIEW::LEFT); // Retrieve the left image
5}

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.

1// Set exposure to 50% of camera framerate
2zed.setCameraSettings(VIDEO_SETTINGS::EXPOSURE, 50);
3// Set white balance to 4600K
4zed.setCameraSettings(VIDEO_SETTINGS::WHITE_BALANCE, 4600);
5// Reset to auto exposure
6zed.setCameraSettings(VIDEO_SETTINGS::EXPOSURE, VIDEO_SETTINGS_VALUE_AUTO);

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.