Skip to main content

Camera ID to Label Mapping

What is Camera ID?

camera_id is a property available in streaming image data. When you receive image data through the streaming callbacks (via ImageDataRecord), each image frame includes a camera_id field that identifies which camera captured the image.

You can access the camera ID in your streaming callback:

def image_callback(image_data: ImageData, image_record: ImageDataRecord):
camera_id = image_record.camera_id
# Use camera_id to identify which camera this frame came from

What is Camera Label?

A camera label is a human-readable string identifier used in device calibration and projectaria_tools APIs to reference a specific camera sensor. Labels like camera-rgb, slam-front-left, or camera-et-left are used throughout the SDK for camera-related operations and are consistent with the labels used in VRS Stream ID to Label Mapping.

Camera ID to Label Mapping for Aria Gen2

The following table provides the mapping between streaming camera_id values and their corresponding sensor labels.

Table 1: Camera ID to label mapping for Aria Gen2

SensorCamera IDLabel
SLAM camera front left1slam-front-left
SLAM camera front right2slam-front-right
SLAM camera side left4slam-side-left
SLAM camera side right8slam-side-right
ET camera left16camera-et-left
ET camera right32camera-et-right
RGB camera64camera-rgb
Camera ID Values

The camera ID values use a bitmask pattern (powers of 2: 1, 2, 4, 8, 16, 32, 64), allowing multiple cameras to be represented in a single value using bitwise operations.

Example Usage

Here's how to use the camera ID mapping in your streaming callback:

# Camera ID to label mapping
CAMERA_ID_TO_LABEL = {
1: "slam-front-left",
2: "slam-front-right",
4: "slam-side-left",
8: "slam-side-right",
16: "camera-et-left",
32: "camera-et-right",
64: "camera-rgb",
}

def image_callback(image_data: ImageData, image_record: ImageDataRecord):
camera_id = image_record.camera_id
camera_label = CAMERA_ID_TO_LABEL.get(camera_id, "unknown")

print(f"Received image from {camera_label} (camera_id={camera_id})")