API docs

The delivery file: topics, units and frames

Spec version: 1

This page describes the file a customer downloads for one job. It states every topic the file can hold, with its units, its axes, its coordinate frame and its clock. The service writes the file and refuses to write a topic that is not on this page.

What you download

One MCAP file per job. MCAP is a container of timestamped messages, grouped into named topics. Every message is a protobuf message, and the file carries the protobuf description of each schema, so an MCAP reader with protobuf support decodes it with no extra files.

The job's result manifest comes with the file. The API returns it as the job's result. It gives the file's size in bytes, its sha256 and its md5, the status of each output, and the output frame described below.

The file holds the whole video. It is never cut into pieces.

The output frame

Every result refers to the pictures the service made from your video, not to your video's own pictures. These pictures and their clock are the output frame.

Your request heldPictures in the fileWhat leaves
Lens valuesUndistorted to an ideal pinhole camera, cropped to 16:9, at most 1920 by 1080Video, masks, camera topics, and depth and trajectory when they completed
No lens valuesYour aspect ratio, scaled down until the long side is at most 1920 and the short side at most 1080Video and masks only

The manifest's output_frame states which row applies (path is lens or blur_only) and gives width, height and frames.

Frames. A video faster than 55 frames per second loses whole frames: a frame is kept once it is at least one 55th of a second after the last kept frame. A 60 fps video becomes 30 fps. A 50 fps video stays at 50 fps. No frame is invented, and every kept frame keeps its own time.

Clock. Message times are in nanoseconds. They are not wall-clock times. The first frame has the time base_time_ns, and every other message keeps its distance from that frame. To get the time of a message on your video's own clock, use:

time in your video = source_start_ns + (message time - base_time_ns)

source_start_ns is the presentation time of the first frame in your video file. Both values are in the manifest's output_frame, together with first_frame_ns and last_frame_ns.

Coordinate frames

All frames are right-handed. Lengths are in metres.

Frame idWhat it isAxes
color0The camera's optical frame. Pixels and depth refer to it.x to the right of the picture, y down, z forward along the optical axis
cameraThe camera's body frame. The trajectory gives its pose.x forward, y to the left, z up
imu0The frame of your IMU values.The axis order that your IMU file, or the IMU stream inside your video, stores
worldThe fixed frame of the trajectory.See Trajectory

/camera/tf_static links camera to color0 and camera to imu0.

Topics

"Per frame" means one message for every video frame, stamped with that frame's time. The same time is inside the message as well: in its timestamp field, or in the timestamp of each transform.

TopicSchemaHow oftenLeaves when
/camera/color/0/imagefoxglove.CompressedVideoper framealways
/pii/mask/0foxglove.CompressedImageper framealways
/pii/labelsmicroagi.SegmentationLabelsoncealways
/camera/color/0/infofoxglove.CameraCalibrationoncelens values were given
/camera/tf_staticfoxglove.FrameTransformsoncelens values were given
/camera/imu/0/accel/infomicroagi.ImuInfoonceIMU data was given
/camera/imu/0/accel/samplefoxglove.PoseInFrameper IMU sampleIMU data was given
/camera/imu/0/gyro/infomicroagi.ImuInfoonceIMU data was given
/camera/imu/0/gyro/samplefoxglove.PoseInFrameper IMU sampleIMU data was given
/camera/relative_depth/0/imagefoxglove.CompressedImageper framedepth completed
/camera/relative_depth/0/infofoxglove.CameraCalibrationoncedepth completed
/camera/relative_depth/0/healthmicroagi.Healthper framedepth completed
/camera/relative_depth/0/unit_of_depth_in_mmmicroagi.UnitOfDepthInMMoncedepth completed
/slam/tffoxglove.FrameTransformsper frametrajectory completed
/slam/healthmicroagi.Healthper frametrajectory completed

The file also holds two MCAP metadata records: delivery_file, with this page's spec_version, and slam_world when the trajectory completed. Each topic has one channel. A message's publish time equals its log time.

Video

/camera/color/0/image is H.265 video with the personal data blurred in the pictures themselves.

A pixel is blurred when the frame's mask marks it with any class other than 0. The blur is a box blur 51 pixels wide. Outside the mask, the brightness of every pixel keeps its value until the video is encoded again. Colour is stored once for each block of 2 by 2 pixels, so a block with one marked pixel gets blurred colour as a whole.

Masks

/pii/mask/0 holds one PNG per frame. It is one channel of 8 bits.

/pii/labels maps each class number to its name. In this version:

ValueClass
0background
1human face
2human head
3license plate
4ID card
5passport
6credit card
7handwritten text
8paper document
9address label on package
10screen

Read the names from /pii/labels in your file. The table above can grow in a later version.

Camera

/camera/color/0/info describes the pictures of the output frame, not your camera's original pictures.

/camera/tf_static holds one transform, or two when IMU data was given. A transform maps a point in the child frame to the parent frame.

ParentChildValue
cameracolor0A fixed rotation with no translation. It turns the optical axes into the body axes of the table above.
cameraimu0That rotation combined with the IMU-to-camera transform you sent. Its translation is in metres. Present only with IMU data.

IMU

The IMU topics hold the values you sent, moved onto the clock of the output frame.

Depth

/camera/relative_depth/0/image holds one PNG per frame, with one channel of 16 bits. The word "relative" in the topic name is historical: the values are metric.

/camera/relative_depth/0/health says whether each frame's depth is usable. valid is true for a normal frame. A frame that fails a quality check has valid false, and its depth picture is all zeros.

Trajectory

/slam/tf holds one transform per frame. Its parent is world and its child is camera.

Read /slam/health together with every pose. When tracking is lost for a frame, /slam/tf repeats the last pose, and before the first pose it holds the identity. Only valid tells a repeated pose from a real one.

details.reasonvalidMeaning
validtrueThe pose is usable.
unanchoredtrueThe pose is usable, but the up direction was not measured. Do not use heights.
loop_skippedtrueLocal motion is usable. Positions far apart in time are not checked against each other.
loop_unreconciled_tailtrueUsable, but revisited places still disagree after a correction.
lostfalseNo pose exists for the frame. Skip the frame.
jumpfalseThe pose moves in a way the IMU did not measure, or farther in one step than a person moves. Skip the frame.

The slam_world record

This metadata record says how to read the world frame.

FieldMeaning
levelledtrue when gravity was found. Then z points up. When false, the world frame has no known up direction.
frame_parent, frame_childThe frame ids of the transform: world and camera.
child_basisAlways camera_body: the pose is of the body frame camera, as in the frame table above.
yaw_gaugeHow the horizontal direction was fixed. camera0_forward: x is the first frame's viewing direction, projected onto the horizontal plane. camera0_right: the camera looked almost straight down, so x is its right direction instead. none: the world is not levelled.
datum_sourceHow the height z = 0 was chosen: from a measured floor (measured_floor, measured_floor_semantic_only) or from the operator's height (operator_height, operator_height_dominant).

In a levelled world, y completes a right-handed frame with x and z. The horizontal origin is not moved to any special place.

The run summary

The channel of /slam/health carries a summary of the whole video as channel metadata.

FieldMeaning
framesThe number of frames.
frames_invalidThe number of frames whose valid is false.
frames_lostThe number of frames with the reason lost.
frames_jumpThe number of frames with the reason jump.
run_loopHow the check of revisited places ended: confirmed, corrected (drift was found and fixed), reverted_with_evidence or skipped_no_evidence.
imu_witnessok when the poses were checked against the IMU. Any other value means that no frame was checked for jumps against the IMU. That is not the same as no jumps.

What the file never holds

The service copies only the topics of the table above, each from the one input it belongs to and only under the schema the table states. It drops every other topic and every other metadata record. Of the channel metadata, only the run summary above is copied.

An output that did not complete leaves nothing in the file. The manifest says which outputs the file holds.