Skip to main content
Version: 12.0

Tabular

Purpose

  • Exports the intrinsic and extrinsic data in a plex in a simplified table-based format.

Usage

metrical shape tabular [OPTIONS] <PLEX_OR_RESULTS_PATH> <OUTPUT_DIR>

Concepts

When using metrical, the Plex format is preferred because it represents a complete description of the system, including:

  • Intrinsics as well as their covariance
  • Spatial constraints that describe Extrinsics as well as their covariance
  • Temporal constraints that describes the synchronization of various clocks across the system

This information is used to configure and initialize calibration, and are leveraged to provide lookups of spatial constraints with the minimum covariance. Other shape modes utilize this information to, for example, produce the MST of the system.

The tabular shape mode is a subset of the data in a Plex, which contains:

  1. The intrinsic information of each component in the source Plex (without covariance).
  2. The extrinsic information of each connected component pairing in the source Plex (without covariance).

At present, the intrinsic information for camera components also includes the serialized lookup tables (LUTs) similar to what is output by the LUT mode, but instead for every camera in the source Plex, rather than for just a single camera.

The purpose of the Tabular mode is to provide a simplified description of the calibration and related artefacts (such as the LUTs) that is more suitable for flashing onto devices that may not need the full system description.

Generally speaking, the output JSON (or MessagePack binary) will have fields akin to the following:

{
"first_component_name": {
"raw_intrinsics": {
// intrinsics model as encoded in the plex
},

"lut": {
"width": 800,
"height": 700,
"remapping_columns": [
/* an 800×700 LUT in row-major order */
],
"remapping_rows": [
/* an 800×700 LUT in row-major order */
]
}
},

"second_component_name": {
"raw_intrinsics": {
// intrinsics model as encoded in the plex
},

"lut": {
"width": 800,
"height": 700,
"remapping_columns": [
/* an 800×700 LUT in row-major order */
],
"remapping_rows": [
/* an 800×700 LUT in row-major order */
]
}
},

"extrinsics_table": [
{
"extrinsics": {
"rotation": [0, 0, 0, 1],
"translation": [3.0, 4.0, 5.0]
},
"from": "first_component_name",
"to": "second_component_name"
},

{
"extrinsics": {
"rotation": [0, 0, 0, 1],
"translation": [-3.0, -4.0, -5.0]
},
"from": "second_component_name",
"to": "first_component_name"
}
]
}

Aside from the special "extrinsics_table" member which specifies the list of extrinsics pairs in the plex, each component is treated as a named member of the broader "tabular" format object.

Examples

Create a tabular calibration in the current directory

metrical shape tabular input_data.results.json .
# To view it
jq -C . input_data.results.tabular.json | less

Create a tabular calibration in MsgPack format in the /calibrations directory

metrical shape tabular -f msgpack input_data.results.json /calibrations

Create a tabular calibration that only includes /camera* topics

metrical shape tabular --filter-component "/camera*" input_data.results.json .
# To view it
jq -C . input_data.results.tabular.json | less

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).

-f, --format [FORMAT]

Default: json

What serializer to use to format the output. Possible values:

  • json: Output the tabular format as JSON
  • msgpack: Output the tabular format as MsgPack

--filter-component [FILTER_COMPONENT]

A set of filters for which components to include. Every filter is a component specifier (name or UUID) applied as if it is given an "OR" relationship with other filters.