Passive Stereo Point Cloud Generation

Description

Infers and reconstructs a colored 3D cloud from image lists and camera parameters.

Overview

Reconstructs colored 3D point clouds from stereo images through TensorRT stereo matching.

Scenarios

Passive-stereo reconstruction and tiled inference.

Inputs and Outputs

Inputs

Image list: Left, right, optional color at [0], [1], [2].

Camera parameters: Supports DepthSrc, camera0/camera1, and CameraMaster.

Outputs

3D point cloud: Six values per point: [X,Y,Z(mm),R,G,B].

Parameters

Initialization Parameters

Operation Type

Description

Select “TRT Export” to build an engine from ONNX, or “TRT Inference” to load and warm up an existing engine before reconstruction.

Tuning Instructions

Use “TRT Export” first when no engine exists; use “TRT Inference” with an existing compatible engine.

Parameter Range

Options: TRT Export, TRT Inference, Default: TRT Inference

Parameter Range

Values/Range:

  • TRT Export

  • TRT Inference

Default: TRT Inference

ONNX Model File

Description

ONNX stereo-matching model used by “TRT Export”.

Tuning Instructions

Choose S, M, or L according to the required speed, point-cloud quality, and GPU-memory budget.

Download Links

Parameter Range

Options: .onnx

Parameter Range

Values/Range:

  • .onnx

TRT Engine Directory

Description

Directory where “TRT Export” saves the engine; its filename records aligned optimal and maximum input sizes.

Tuning Instructions

Choose a writable directory from which the engine can later be selected for “TRT Inference”.

Parameter Range

Set according to the input data

TRT Workspace (GB)

Description

GPU scratch-workspace limit available while TensorRT builds the engine.

Tuning Instructions

Increasing it lets the builder try more tactics but raises export-time GPU-memory demand; it does not change cloud scale.

Parameter Range

[2, 8], Default: 4, Unit: GB

Parameter Range

Values/Range: [2, 8]

Default: 4

Unit: GB

Optimal Input Height (px)

Description

Typical input height in the dynamic TensorRT profile; rounded upward to a multiple of 32 before building.

Tuning Instructions

Set it near the usual tile height and no greater than Maximum Input Height to optimize common shapes.

Parameter Range

[256, 896], Default: 448, Unit: px

Parameter Range

Values/Range: [256, 896]

Default: 448

Unit: px

Maximum Input Height (px)

Description

Maximum input height accepted by the dynamic TensorRT profile; rounded upward to a multiple of 32 before building.

Tuning Instructions

Keep it at least Optimal Input Height and large enough for the aligned runtime tile; larger values generally raise GPU-memory capacity requirements.

Parameter Range

[384, 896], Default: 512, Unit: px

Parameter Range

Values/Range: [384, 896]

Default: 512

Unit: px

Optimal Input Width (px)

Description

Typical input width in the dynamic TensorRT profile; rounded upward to a multiple of 32 before building.

Tuning Instructions

Set it near the usual width after scaling, ROI context, and padding, and no greater than Maximum Input Width.

Parameter Range

[1024, 3072], Default: 2048, Unit: px

Parameter Range

Values/Range: [1024, 3072]

Default: 2048

Unit: px

Maximum Input Width (px)

Description

Maximum input width accepted by the dynamic TensorRT profile; rounded upward to a multiple of 32 before building.

Tuning Instructions

It must cover actual width after scaling, ROI context, and right padding, or inference exceeds the profile.

Parameter Range

[1024, 3072], Default: 2880, Unit: px

Parameter Range

Values/Range: [1024, 3072]

Default: 2880

Unit: px

TRT Engine File

Description

TensorRT engine loaded by “TRT Inference”; its dynamic profile must cover runtime input shapes.

Tuning Instructions

Select an engine built from the compatible model and dimensions; an incompatible profile causes initialization or inference failure.

Parameter Range

Options: .engine

Parameter Range

Values/Range:

  • .engine

Run Parameters

Enable Inference ROI

Description

When enabled, applies Inference ROI on the unrectified left image while retaining left context for stereo matching; when disabled, uses the full stereo pair.

Tuning Instructions

Enable for local reconstruction to reduce the processed area; disable when the complete cloud is needed.

Parameter Range

Default: False

Inference ROI

Description

2D rectangle on the unrectified left image, used only when Inference ROI is enabled; output is cropped back to this region.

Tuning Instructions

Keep it within the image and around the target; shrink it to process less area or enlarge it to cover more scene.

Parameter Range

Set according to the input data

Parameter Range

Default: [{"min": [0, 0], "max": [1000, 1000]}]

Model Input Tile Height (px)

Description

Vertical height of one TensorRT tile; after upward padding to a multiple of 32 it must fit the engine maximum, and adjacent tiles overlap.

Tuning Instructions

Increasing it usually reduces tile count and speeds inference but consumes more GPU memory; decrease it when memory is insufficient.

Parameter Range

[320, 896], Default: 448, Unit: px

Parameter Range

Values/Range: [320, 896]

Default: 448

Unit: px

Far Depth (mm)

Description

Farthest reconstructed Z depth retained; points beyond it are invalid.

Tuning Instructions

Lower it to remove distant background and low-disparity noise; keep it above Near Depth.

Parameter Range

[500, 200000], Default: 1500, Unit: mm

Parameter Range

Values/Range: [500, 200000]

Default: 1500

Unit: mm

Near Depth (mm)

Description

Nearest reconstructed Z depth retained; points closer than it are invalid.

Tuning Instructions

Raise it to reject near-camera points or mismatches; keep it below Far Depth.

Parameter Range

[10, 5000], Default: 100, Unit: mm

Parameter Range

Values/Range: [10, 5000]

Default: 100

Unit: mm

Scaling Ratio

Description

Scales stereo images and ROI before inference; intrinsics follow the actual scale so XYZ remains in millimetres, then dimensions are padded to multiples of 32.

Tuning Instructions

Decrease to reduce memory and latency at the cost of disparity detail and cloud density; 1.0 uses original size.

Parameter Range

[0.1, 1.0], Default: 1.0

Parameter Range

Values/Range: [0.1, 1.0]

Default: 1.0

Enable Color Alignment

Description

When enabled, projects the third external color image onto the cloud using camera parameters; missing data or failure falls back to left-image texture. When disabled, uses the left inference image directly.

Tuning Instructions

Enable for grayscale stereo when an external color image and calibration are available; otherwise disable to skip projection.

Parameter Range

Default: False