Run examples
Four OpenGL viewers ship as sources with the SDK. They are the reference integration — read them when you write your own application.
Run them from <prefix>\example\build\Release on Windows, or <prefix>/example/build on Ubuntu.
The four viewers
Viewer | What it does |
|---|---|
| Live streaming from a fixed device list. The reference sync integration |
| Plays back recorded |
| Live, with the Manager - connect and disconnect cameras at runtime |
| Live streaming plus 3D segmentation overlay |
Every viewer takes --config=<prefix>/config and starts in color unless you pass color_depth or pointcloud.
View controls are the same in all four. Switch the view live with 1 / 2 / 3 - colour, colour + depth, point cloud. In point-cloud mode, drag to orbit and scroll the wheel to zoom. ESC quits.
[!NOTE] A complete multi-camera frame group only forms when the camera hosts are PTP-synced. A single camera always forms complete groups; a second one joins once the two hosts share a clock. See Set up time sync (PTP).
viewer_opengl_streaming
Live point clouds from a fixed device list.
Or with a JSON device list:
Press R to record each camera (files video_<device-id>_<n>.mkv), S to stop.
The --clients file
A small JSON listing the device IDs to stream - the same set you would pass to --devices, in a file. Handy for a fixed rig or many cameras. A ready-to-copy template lives at <prefix>/example/streaming_client_info_example.json.
To fill it in for your own rig:
List your real device IDs - launch
viewer_opengl_with_managerand pressI.Add one
client_infoentry per camera. Every ID must have a matchingconfig/<device-id>/folder under--config.Set
client_numto the entry count. Two entries means"client_num": 2.
--clients is mutually exclusive with --devices.
viewer_opengl_loader
Plays back recorded .mkv files. No cameras needed.
Get the recordings. They come from the
Rkey in the streaming, manager or segment viewers.Write a
--videosJSON pairing eachclient_idwith itsvideo_file. Use full paths with forward slashes. Theclient_idmust match the recorded device so the loader can read that device'sconfig/<client_id>/for intrinsics and extrinsics.Run it:
Playback keys: P pause, R resume, S reset to 2 s, T print time. Multiple recordings are auto-aligned and synchronized on playback.
viewer_opengl_with_manager
Discovers and connects cameras at runtime. It takes no --devices or --clients - it finds cameras over mDNS. It still takes --config.
Drive it from the keyboard in the viewer window. Keys marked (asks for id) prompt you to type a device ID in the terminal and press Enter.
Key | Action |
|---|---|
| List every camera discovered on the LAN. This is how you learn what you have |
| Connect all discovered cameras (management channel) |
| Connect one (asks for id) - connects it and copies that camera's real configs into |
| Start streaming one connected camera (asks for id). Repeat per camera |
| Disconnect one camera (asks for id) |
| Start/stop server-side recording |
| Push an exposure/white-balance update to every connected camera |
Typical run: launch → I to see the cameras → X (or C per ID) to connect → L each camera ID to start streaming → view the fused cloud. Each streaming camera attaches to and detaches from the synchronizer automatically.
Recording with R saves on the server side, under the server's videos/ folder as Recording_<device-id>_<n>.mkv for every connected camera. S stops. Client-side recording on the device is not used.
viewer_opengl_segment
Streaming plus 3D segmentation. Takes the same fixed-device-list arguments as streaming.
G segments once; H toggles continuous.
[!IMPORTANT] Segmentation requires the Python detector service. Set it up first - Set up the detection system. Without it the viewer still streams the live cloud but reports segmentation unavailable.
Command-line reference
Arguments may appear in any order. A bare word that is not a render mode and does not start with -- is treated as the config path.
Argument | Used by | What it does |
|---|---|---|
| all | Positional render mode. Sets the initial view; switch live with |
| all | The config folder, normally |
| streaming, segment | The fixed list of device IDs to stream, comma-separated, no spaces. Each ID must have a matching |
| streaming, segment | The same fixed list read from a JSON file. Mutually exclusive with |
| loader | Like |
[!NOTE]
viewer_opengl_with_managertakes none of--devices,--clientsor--videos. It discovers cameras over mDNS and you connect and stream them with the keys above. It still takes--config.
Keyboard reference
Key | Where | Action |
|---|---|---|
| all | colour/colour + depth/point cloud |
drag / wheel | all (point-cloud mode) | orbit/zoom |
| streaming, manager, segment | start/stop recording |
| loader | pause/resume/reset-to-2 s/print time |
| segment | segment once/toggle continuous |
| manager | list/connect one/connect all/disconnect/start-stream one/exposure |
| all | quit |
Next steps
Set up the detection system for the segmentation overlay, or go straight to Use the SDK in your own project.