﻿# Mitsuba depth labels: distinguish pinhole distance from camera-axis depth

Interpret Mitsuba depth AOVs before using rendered images for depth learning, accounting for camera projection, world units, invalid pixels and filtering.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/fg2-mitsuba-depth-aov-radial-camera-axis/
Language: en

## Begin with the learning target

A depth model can learn distance along a viewing ray or a coordinate along the camera's forward axis. These quantities agree for a surface directly in front of the camera center, which can hide a dataset mistake during a casual inspection. State the target convention before producing labels. Also specify whether invalid observations use a separate mask, a reserved value or another explicit representation.

## Read the renderer's measurement

The [integrator reference](https://mitsuba.readthedocs.io/en/latest/src/generated/plugins_integrators.html) describes the depth AOV as distance from the pinhole. Do not rename that output camera-axis depth without a geometric conversion. For a perspective camera and a unit viewing direction, projecting the distance onto the camera's forward direction produces the corresponding axial coordinate. This interpretation requires consistent camera transforms and a documented direction convention rather than only the image dimensions.

## Include the projection model

The [sensor reference](https://mitsuba.readthedocs.io/en/latest/src/generated/plugins_sensors.html) distinguishes perspective and orthographic sensors and documents clipping controls. A conversion derived for a pinhole should not silently govern every camera plugin. Preserve projection parameters and camera-to-world transforms with each sample. Check objects near image corners, since they expose radial-versus-axial differences more clearly than a small object centered in the frame. Resolve clipping and missing intersections before applying a numerical normalization.

## Treat boundaries as mixed measurements

The [reconstruction filter documentation](https://mitsuba.readthedocs.io/en/latest/src/generated/plugins_rfilters.html) explains how samples become pixels. Across an object boundary, a filtered depth value may combine observations of different surfaces. An RGB edge that looks smooth does not establish a unique geometric label there. Define whether the task accepts integrated measurements, center-ray labels or a conservative validity mask. Preserve that choice when comparing generated supervision with a real depth sensor.

## Use a planar diagnostic scene

Render a front-facing plane spanning the frame and inspect center and corner pixels under the chosen convention. A constant axial plane should not be mistaken for a constant radial range image. The guides to [renderer compatibility](/journal/gpu-llm-renderer-compatibility-matrix/) and [image coordinate transforms](/journal/data-guide-image-exif-box-coordinate/) address neighboring assumptions. Accept the export only after camera geometry, distance units, invalid pixels and reconstruction behavior explain the actual label tensor.
