# entzauberung-x/3d-reconstruction architecture

> Architecture diagram of the GitHub repository entzauberung-x/3d-reconstruction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-18). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/entzauberung-x/3d-reconstruction
- Repository: https://github.com/entzauberung-x/3d-reconstruction

## Overview

This is a Qt desktop application for binocular line-laser scanning on a rotary turntable. The user workflow moves from camera and system calibration through laser-plane and turntable calibration to multi-view reconstruction and 3D inspection. The README documents capabilities beyond the sampled excerpts; those branches are represented at subsystem level. Source-index references and excerpts support the component relationships shown, while uncertain wiring is omitted rather than inferred.

Main entry points: [`src/ui/mainwindow.cpp`](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/mainwindow.cpp) (Workflow UI), [`src/ui/mainwindow_tab5.cpp`](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/mainwindow_tab5.cpp) (Reconstruction UI), [`src/ui/mainwindow_tab1.cpp`](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/mainwindow_tab1.cpp) (Calibration workflows), [`src/ui/mainwindow_tab3.cpp`](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/mainwindow_tab3.cpp) (Laser calibration UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop interface"]
  node_mainwindow["Workflow UI<br/>[mainwindow.cpp]"]
  node_calibration_tabs["Calibration workflows"]
  node_laser_tab["Laser calibration UI"]
  node_recon_tab["Reconstruction UI"]
  node_video_widget["Camera video display<br/>[videowidget.cpp]"]
end

subgraph group_capture["Capture and control"]
  node_camera_thread["Camera capture<br/>[camerathread.cpp]"]
  node_serial["Turntable serial control"]
end

subgraph group_calibration["Calibration"]
  node_camera_calib["Camera calibration"]
  node_pose["Planar pose solving<br/>[pose_solver.cpp]"]
  node_laser_worker["Laser processing worker<br/>[laserworker.cpp]"]
  node_laser_calib["Laser extraction and plane fitting"]
  node_axis_calib["Turntable axis calibration"]
  node_calibration_io["Calibration data I/O<br/>[calibration_io.cpp]"]
end

subgraph group_reconstruction["Reconstruction"]
  node_recon_worker["Reconstruction worker"]
  node_cloud_builder["Point-cloud reconstruction"]
  node_cloud_viewer["3D point-cloud viewer"]
end

subgraph group_diagnostics["Inspection and support"]
  node_curve_plot["Diagnostic plots"]
  node_logger["Application logging<br/>[logger.h]"]
end

node_operator(("Operator"))

node_operator -->|"operates"| node_mainwindow
node_mainwindow -.->|"opens workflows"| node_calibration_tabs
node_mainwindow -.->|"opens workflow"| node_laser_tab
node_mainwindow -.->|"opens workflow"| node_recon_tab
node_mainwindow -.->|"controls capture"| node_camera_thread
node_mainwindow -.->|"controls turntable"| node_serial
node_mainwindow -.->|"displays video"| node_video_widget
node_calibration_tabs -.->|"runs calibration"| node_camera_calib
node_camera_calib -->|"uses pose solver"| node_pose
node_laser_tab -->|"starts processing"| node_laser_worker
node_laser_worker -->|"processes images"| node_laser_calib
node_laser_tab -->|"calibrates plane"| node_laser_calib
node_calibration_tabs -.->|"calibrates axis"| node_axis_calib
node_axis_calib -->|"solves poses"| node_pose
node_calibration_tabs -->|"loads and saves"| node_calibration_io
node_recon_tab -->|"starts reconstruction"| node_recon_worker
node_recon_worker -->|"builds point clouds"| node_cloud_builder
node_recon_tab -->|"configures pipeline"| node_cloud_builder
node_recon_tab -->|"displays results"| node_cloud_viewer
node_mainwindow -->|"logs activity"| node_logger
node_axis_calib -->|"logs calibration"| node_logger
node_cloud_builder -->|"logs reconstruction"| node_logger
node_mainwindow -.->|"shows diagnostics"| node_curve_plot
node_recon_tab -->|"plots diagnostics"| node_curve_plot

click node_mainwindow "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/mainwindow.cpp"
click node_calibration_tabs "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/mainwindow_tab1.cpp"
click node_laser_tab "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/mainwindow_tab3.cpp"
click node_recon_tab "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/mainwindow_tab5.cpp"
click node_camera_thread "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/io/camerathread.cpp"
click node_serial "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/io/serialportmanager.cpp"
click node_camera_calib "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/core/cameracalibration.cpp"
click node_pose "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/core/pose_solver.cpp"
click node_laser_worker "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/io/laserworker.cpp"
click node_laser_calib "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/core/lasercalibration.cpp"
click node_axis_calib "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/core/rotatingcalibrator.cpp"
click node_calibration_io "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/calibration_io.cpp"
click node_recon_worker "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/io/reconstructionworker.cpp"
click node_cloud_builder "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/core/pointcloudbuilder.cpp"
click node_cloud_viewer "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/core/pointcloudviewer.cpp"
click node_video_widget "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/videowidget.cpp"
click node_curve_plot "https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/curveplotwidget.cpp"
click node_logger "https://github.com/entzauberung-x/3d-reconstruction/blob/master/include/ui/logger.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mainwindow,node_calibration_tabs,node_laser_tab,node_recon_tab,node_video_widget toneBlue
class node_camera_thread,node_serial toneAmber
class node_camera_calib,node_pose,node_laser_worker,node_laser_calib,node_axis_calib,node_calibration_io toneMint
class node_recon_worker,node_cloud_builder,node_cloud_viewer toneRose
class node_curve_plot,node_logger,node_operator toneIndigo
```

## Components

### Desktop interface

- [Workflow UI](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/mainwindow.cpp): `src/ui/mainwindow.cpp`
- [Calibration workflows](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/mainwindow_tab1.cpp): `src/ui/mainwindow_tab1.cpp`
- [Laser calibration UI](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/mainwindow_tab3.cpp): `src/ui/mainwindow_tab3.cpp`
- [Reconstruction UI](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/mainwindow_tab5.cpp): `src/ui/mainwindow_tab5.cpp`
- [Camera video display](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/videowidget.cpp): `src/ui/videowidget.cpp`

### Capture and control

- [Camera capture](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/io/camerathread.cpp): `src/io/camerathread.cpp`
- [Turntable serial control](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/io/serialportmanager.cpp): `src/io/serialportmanager.cpp`

### Calibration

- [Camera calibration](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/core/cameracalibration.cpp): `src/core/cameracalibration.cpp`
- [Planar pose solving](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/core/pose_solver.cpp): `src/core/pose_solver.cpp`
- [Laser processing worker](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/io/laserworker.cpp): `src/io/laserworker.cpp`
- [Laser extraction and plane fitting](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/core/lasercalibration.cpp): `src/core/lasercalibration.cpp`
- [Turntable axis calibration](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/core/rotatingcalibrator.cpp): `src/core/rotatingcalibrator.cpp`
- [Calibration data I/O](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/calibration_io.cpp): `src/ui/calibration_io.cpp`

### Reconstruction

- [Reconstruction worker](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/io/reconstructionworker.cpp): `src/io/reconstructionworker.cpp`
- [Point-cloud reconstruction](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/core/pointcloudbuilder.cpp): `src/core/pointcloudbuilder.cpp`
- [3D point-cloud viewer](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/core/pointcloudviewer.cpp): `src/core/pointcloudviewer.cpp`

### Inspection and support

- [Diagnostic plots](https://github.com/entzauberung-x/3d-reconstruction/blob/master/src/ui/curveplotwidget.cpp): `src/ui/curveplotwidget.cpp`
- [Application logging](https://github.com/entzauberung-x/3d-reconstruction/blob/master/include/ui/logger.h): `include/ui/logger.h`

### Other components

- **Operator**

## Connections

- Operator → Workflow UI: operates (evidence: `README.md`)
- Workflow UI → Calibration workflows: opens workflows
- Workflow UI → Laser calibration UI: opens workflow
- Workflow UI → Reconstruction UI: opens workflow
- Workflow UI → Camera capture: controls capture
- Workflow UI → Turntable serial control: controls turntable
- Workflow UI → Camera video display: displays video
- Calibration workflows → Camera calibration: runs calibration
- Camera calibration → Planar pose solving: uses pose solver (evidence: `src/core/cameracalibration.cpp`)
- Laser calibration UI → Laser processing worker: starts processing
- Laser processing worker → Laser extraction and plane fitting: processes images
- Laser calibration UI → Laser extraction and plane fitting: calibrates plane
- Calibration workflows → Turntable axis calibration: calibrates axis
- Turntable axis calibration → Planar pose solving: solves poses
- Calibration workflows → Calibration data I/O: loads and saves (evidence: `src/ui/calibration_io.cpp`)
- Reconstruction UI → Reconstruction worker: starts reconstruction
- Reconstruction worker → Point-cloud reconstruction: builds point clouds
- Reconstruction UI → Point-cloud reconstruction: configures pipeline
- Reconstruction UI → 3D point-cloud viewer: displays results
- Workflow UI → Application logging: logs activity (evidence: `src/ui/mainwindow.cpp`)
- Turntable axis calibration → Application logging: logs calibration (evidence: `src/core/rotatingcalibrator.cpp`)
- Point-cloud reconstruction → Application logging: logs reconstruction (evidence: `src/core/pointcloudbuilder.cpp`)
- Workflow UI → Diagnostic plots: shows diagnostics
- Reconstruction UI → Diagnostic plots: plots diagnostics
