Sensor Models and Scheimpflug Tilt
In standard cameras, the sensor plane is perpendicular to the optical axis. Some industrial cameras — particularly laser triangulation profilers — deliberately tilt the sensor to achieve a larger depth of field along the laser plane (the Scheimpflug condition). The sensor model stage accounts for this tilt.
The SensorModel Trait
#![allow(unused)] fn main() { pub trait SensorModel<S: RealField> { fn normalized_to_sensor(&self, n: &Point2<S>) -> Point2<S>; fn sensor_to_normalized(&self, s: &Point2<S>) -> Point2<S>; } }
The sensor model sits between distortion and intrinsics in the pipeline:
IdentitySensor
For standard cameras with untilted sensors:
This is the default and most common case.
Scheimpflug Tilt Model
The Scheimpflug condition states that when the lens plane, image plane, and object plane intersect along a common line, the entire object plane is in sharp focus. Laser profilers exploit this by tilting the sensor to keep the laser line in focus.
Tilt Projection Matrix
The tilt is parameterized by two rotation angles:
- — tilt around the horizontal (X) axis
- — tilt around the vertical (Y) axis
The tilt homography is constructed as:
The projection onto the tilted sensor plane normalizes by the third row of applied to the point in homogeneous coordinates:
where normalizes by the -component (perspective division through the tilted plane). In practice, the first two rows of divided by the third row give a rational transform in the image plane.
OpenCV equivalence: This matches OpenCV's
computeTiltProjectionMatrixused in the 14-parameter rational model (CALIB_TILTED_MODEL).
ScheimpflugParams
#![allow(unused)] fn main() { pub struct ScheimpflugParams { pub tilt_x: f64, // tau_x in radians pub tilt_y: f64, // tau_y in radians } }
The compile() method generates a HomographySensor containing the homography and its precomputed inverse. ScheimpflugParams::default() returns zero tilt (identity sensor).
HomographySensor
The general homography sensor applies an arbitrary projective transform:
This is used as the runtime representation compiled from ScheimpflugParams.
When to Use Scheimpflug
- Laser triangulation profilers: The laser plane is at an angle to the camera axis. Tilting the sensor brings the entire laser line into focus.
- Machine vision with tilted object planes: When the depth of field is insufficient to keep the entire object in focus.
For standard cameras (no tilt), use IdentitySensor (the default).
Optimization of Tilt Parameters
In the non-linear optimization stage, Scheimpflug parameters are treated as additional optimization variables. The tilt_projection_matrix_generic<T>() function in the factor module computes the tilt homography using dual numbers for automatic differentiation, enabling joint optimization of tilt with intrinsics, distortion, and poses.