# hubert-tt/kinect-fusion architecture

> Architecture diagram of the GitHub repository hubert-tt/kinect-fusion, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hubert-tt/kinect-fusion
- Repository: https://github.com/hubert-tt/kinect-fusion

## Overview

KinectFusion is a CPU-oriented RGB-D capture and 3D reconstruction project. Its workflows include recording Kinect frames, aligning recorded RGB-D sequences into a trajectory and voxelized point cloud, and reconstructing a mesh from PLY/PCD input. The older `main_old.cpp` application also integrates frames into a TSDF/color volume and visualizes or exports the result. The sampled sources show these workflows, but do not establish a connection between the separate alignment and mesh-reconstruction applications; they are shown as distinct branches.

Main entry points: [`recon.cpp`](https://github.com/hubert-tt/kinect-fusion/blob/main/recon.cpp) (Cloud reconstruction), [`align.cpp`](https://github.com/hubert-tt/kinect-fusion/blob/main/align.cpp) (RGB-D aligner), [`main_old.cpp`](https://github.com/hubert-tt/kinect-fusion/blob/main/main_old.cpp) (Fusion application), [`record.cpp`](https://github.com/hubert-tt/kinect-fusion/blob/main/record.cpp) (Frame recorder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_capture["Frame capture"]
  node_record_app["Frame recorder<br/>[record.cpp]"]
  node_kinect_source["Kinect source"]
  node_recorded_frames["Recorded RGB-D<br/>[record.cpp]"]
end

subgraph group_alignment["RGB-D alignment"]
  node_file_source["File frame source"]
  node_align_app["RGB-D aligner<br/>[align.cpp]"]
  node_trajectory["Pose trajectory<br/>[align.cpp]"]
  node_voxel_grid[("Voxel point cloud<br/>[align.cpp]")]
end

subgraph group_fusion["Volume fusion"]
  node_fusion_app["Fusion application<br/>[main_old.cpp]"]
  node_tsdf_volume[("TSDF color volume<br/>[main_old.cpp]")]
  node_fusion_output["3D visualization/export<br/>[main_old.cpp]"]
end

subgraph group_meshing["Mesh reconstruction"]
  node_cloud_input["PLY/PCD cloud"]
  node_recon_app["Cloud reconstruction<br/>[recon.cpp]"]
  node_clean_normals["Filter and normals<br/>[recon.cpp]"]
  node_mesh_method["Grid or Poisson<br/>[recon.cpp]"]
  node_mesh_output["PLY mesh<br/>[recon.cpp]"]
end

node_user(("User"))

node_user -->|"runs capture"| node_record_app
node_record_app -->|"reads frames"| node_kinect_source
node_record_app -->|"writes frames"| node_recorded_frames
node_user -->|"runs alignment"| node_align_app
node_align_app -->|"reads frames"| node_file_source
node_align_app -->|"writes poses"| node_trajectory
node_align_app -->|"accumulates points"| node_voxel_grid
node_user -.->|"runs fusion"| node_fusion_app
node_fusion_app -->|"reads frames"| node_file_source
node_fusion_app -->|"integrates frames"| node_tsdf_volume
node_fusion_app -->|"visualizes and exports"| node_fusion_output
node_user -->|"runs reconstruction"| node_recon_app
node_cloud_input -->|"provides cloud"| node_recon_app
node_recon_app -->|"filters and estimates"| node_clean_normals
node_recon_app -->|"reconstructs with"| node_mesh_method
node_recon_app -->|"writes mesh"| node_mesh_output

click node_record_app "https://github.com/hubert-tt/kinect-fusion/blob/main/record.cpp"
click node_kinect_source "https://github.com/hubert-tt/kinect-fusion/blob/main/src/FrameGetter/KinectFrameGetter.cpp"
click node_recorded_frames "https://github.com/hubert-tt/kinect-fusion/blob/main/record.cpp"
click node_file_source "https://github.com/hubert-tt/kinect-fusion/blob/main/src/FrameGetter/FileFrameGetter.cpp"
click node_align_app "https://github.com/hubert-tt/kinect-fusion/blob/main/align.cpp"
click node_trajectory "https://github.com/hubert-tt/kinect-fusion/blob/main/align.cpp"
click node_voxel_grid "https://github.com/hubert-tt/kinect-fusion/blob/main/align.cpp"
click node_fusion_app "https://github.com/hubert-tt/kinect-fusion/blob/main/main_old.cpp"
click node_tsdf_volume "https://github.com/hubert-tt/kinect-fusion/blob/main/main_old.cpp"
click node_fusion_output "https://github.com/hubert-tt/kinect-fusion/blob/main/main_old.cpp"
click node_recon_app "https://github.com/hubert-tt/kinect-fusion/blob/main/recon.cpp"
click node_clean_normals "https://github.com/hubert-tt/kinect-fusion/blob/main/recon.cpp"
click node_mesh_method "https://github.com/hubert-tt/kinect-fusion/blob/main/recon.cpp"
click node_mesh_output "https://github.com/hubert-tt/kinect-fusion/blob/main/recon.cpp"

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_record_app,node_kinect_source,node_recorded_frames,node_user toneBlue
class node_file_source,node_align_app,node_trajectory,node_voxel_grid toneAmber
class node_fusion_app,node_tsdf_volume,node_fusion_output toneMint
class node_cloud_input,node_recon_app,node_clean_normals,node_mesh_method,node_mesh_output toneRose
```

## Components

### Frame capture

- [Frame recorder](https://github.com/hubert-tt/kinect-fusion/blob/main/record.cpp): `record.cpp`
- [Kinect source](https://github.com/hubert-tt/kinect-fusion/blob/main/src/FrameGetter/KinectFrameGetter.cpp): `src/FrameGetter/KinectFrameGetter.cpp`
- [Recorded RGB-D](https://github.com/hubert-tt/kinect-fusion/blob/main/record.cpp): `record.cpp`

### RGB-D alignment

- [File frame source](https://github.com/hubert-tt/kinect-fusion/blob/main/src/FrameGetter/FileFrameGetter.cpp): `src/FrameGetter/FileFrameGetter.cpp`
- [RGB-D aligner](https://github.com/hubert-tt/kinect-fusion/blob/main/align.cpp): `align.cpp`
- [Pose trajectory](https://github.com/hubert-tt/kinect-fusion/blob/main/align.cpp): `align.cpp`
- [Voxel point cloud](https://github.com/hubert-tt/kinect-fusion/blob/main/align.cpp): `align.cpp`

### Volume fusion

- [Fusion application](https://github.com/hubert-tt/kinect-fusion/blob/main/main_old.cpp): `main_old.cpp`
- [TSDF color volume](https://github.com/hubert-tt/kinect-fusion/blob/main/main_old.cpp): `main_old.cpp`
- [3D visualization/export](https://github.com/hubert-tt/kinect-fusion/blob/main/main_old.cpp): `main_old.cpp`

### Mesh reconstruction

- **PLY/PCD cloud**
- [Cloud reconstruction](https://github.com/hubert-tt/kinect-fusion/blob/main/recon.cpp): `recon.cpp`
- [Filter and normals](https://github.com/hubert-tt/kinect-fusion/blob/main/recon.cpp): `recon.cpp`
- [Grid or Poisson](https://github.com/hubert-tt/kinect-fusion/blob/main/recon.cpp): `recon.cpp`
- [PLY mesh](https://github.com/hubert-tt/kinect-fusion/blob/main/recon.cpp): `recon.cpp`

### Other components

- **User**

## Connections

- User → Frame recorder: runs capture (evidence: `README.md`)
- Frame recorder → Kinect source: reads frames (evidence: `record.cpp`)
- Frame recorder → Recorded RGB-D: writes frames (evidence: `record.cpp`)
- User → RGB-D aligner: runs alignment (evidence: `README.md`)
- RGB-D aligner → File frame source: reads frames (evidence: `align.cpp`)
- RGB-D aligner → Pose trajectory: writes poses (evidence: `align.cpp`)
- RGB-D aligner → Voxel point cloud: accumulates points (evidence: `align.cpp`)
- User → Fusion application: runs fusion
- Fusion application → File frame source: reads frames (evidence: `main_old.cpp`)
- Fusion application → TSDF color volume: integrates frames (evidence: `main_old.cpp`)
- Fusion application → 3D visualization/export: visualizes and exports (evidence: `main_old.cpp`)
- User → Cloud reconstruction: runs reconstruction (evidence: `README.md`)
- PLY/PCD cloud → Cloud reconstruction: provides cloud (evidence: `recon.cpp`)
- Cloud reconstruction → Filter and normals: filters and estimates (evidence: `recon.cpp`)
- Cloud reconstruction → Grid or Poisson: reconstructs with (evidence: `recon.cpp`)
- Cloud reconstruction → PLY mesh: writes mesh (evidence: `recon.cpp`)
