Skip to main content
Version: 15.0

Tabular

Usage

Tabular - CLI Example
metrical shape tabular [OPTIONS] <INPUT_PLEX> <ARTIFACT>
Tabular - Manifest Example
command = "shape-tabular"
input-plex = "{{calibrate-stage.results}}"
format = "json|msgpack"
filter-component = ["component_name_or_uuid_one", "component_name_or_uuid_two", ...]
artifact = "{{auto}}"

Purpose

The tabular shape subcommand writes a subset of the data in a Plex in a tabular format, 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 subcommand is to provide a simplified description of the calibration and related artifacts (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.mcap .
# 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.mcap /calibrations

Create a tabular calibration that only includes /camera* topics

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

Arguments

[INPUT_PLEX]

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

[ARTIFACT]

The artifacts output location.

Options

Global Arguments

As with every command, all global arguments 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.