Skip to main content
Version: 12.2

Stereo Lookup Table

Stereo Rectification Schema

The full JSON schema for stereo rectification can be found in the MetriCal Sensor Calibration Utilities repository on GitLab.

Purpose

  • Create two pixel-wise lookup tables that produce a rectified stereo pair.

Usage

metrical shape stereo-lut [OPTIONS] \
--dominant <DOMINANT> \
--secondary <SECONDARY> \
<PLEX_OR_RESULTS_PATH> <OUTPUT_DIR>

Concepts

This mode creates two pixel-wise lookup tables to produce a stereo rectified pair based on an existing calibration. Rectification occurs in a hallucinated frame with a translation at the origin of the dominant eye, but with a rotation halfway between the dominant frame and the secondary frame.

Rectification is the process of transforming a stereo pair of images into a common plane. This is useful for a ton of different applications, including feature matching and disparity estimation. Rectification is often a prerequisite for other computer vision tasks.

The Stereo LUT mode will create two lookup tables, one for each camera in the stereo pair. These LUTs are the same format as the ones created by the lut command, but they map the pixel-wise shift needed to move each image into that common plane. The result is a pair of rectified images!

Stereo LUT mode will also output the values necessary to calculate depth from disparity values. These are included in a separate JSON file in the output directory.

Examples

Create a rectification lookup table between a stereo pair

metrical shape stereo-lut --dominant ir_one --secondary ir_two \
<PLEX_OR_RESULTS_PATH> <OUTPUT_DIR>

Arguments

[PLEX_OR_RESULTS_PATH]

The path to the input plex. This can be a MetriCal results JSON or a plex JSON.

[OUTPUT_DIR]

The output directory for this shaping operation.

Options

Universal Options

As with every mode, all universal options are supported (though not all may be used).

-a, --dominant [DOMINANT]

The dominant eye in this stereo pair. Must be a camera component specifier (UUID or component name)

-b, --secondary [SECONDARY]

The secondary eye in this stereo pair. Must be a camera component specifier (UUID or component name)