# syntherat/hand-gesture-controlled-system-cv-project architecture

> Architecture diagram of the GitHub repository syntherat/hand-gesture-controlled-system-cv-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/syntherat/hand-gesture-controlled-system-cv-project
- Repository: https://github.com/syntherat/hand-gesture-controlled-system-cv-project

## Overview

This is a real-time, webcam-based hand-gesture interface for controlling desktop volume and mouse actions. The principal workflow captures frames in the application loop, detects and interprets hand landmarks, dispatches gesture-specific actions through the controller, and renders status overlays. The graph separates frame orchestration, hand perception, and desktop control/smoothing. Edges reflect the sampled source; the README documents the user-facing capabilities, while the implementation of those capabilities is shown in the excerpts.

Main entry points: [`src/main.py`](https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/src/main.py) (Frame Loop), [`src/gesture_controller.py`](https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/src/gesture_controller.py) (Action Controller), [`src/hand_tracker.py`](https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/src/hand_tracker.py) (Hand Tracker), [`utils/smoothing.py`](https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/utils/smoothing.py) (Smoothing Filters)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Frame Application"]
  node_main["Frame Loop<br/>[main.py]"]
  node_gestures["Gesture Rules<br/>[main.py]"]
  node_fps["FPS and Mode<br/>[main.py]"]
end

subgraph group_perception["Hand Perception"]
  node_tracker["Hand Tracker<br/>[hand_tracker.py]"]
end

subgraph group_control["Gesture Control"]
  node_controller["Action Controller"]
  node_smoothing["Smoothing Filters<br/>[smoothing.py]"]
  node_overlays["Volume Indicator"]
end

node_user(("User"))
node_camera["Webcam"]
node_display["Video Display"]
node_desktop["Desktop Controls"]

node_user -->|"starts"| node_main
node_main -->|"reads frames"| node_camera
node_main -->|"processes frames"| node_tracker
node_tracker -->|"returns landmarks"| node_main
node_main -->|"interprets landmarks"| node_gestures
node_gestures -->|"dispatches actions"| node_controller
node_controller -->|"smooths values"| node_smoothing
node_controller -->|"moves and clicks"| node_desktop
node_controller -->|"presses volume keys"| node_desktop
node_main -->|"draws indicator"| node_controller
node_main -->|"updates status"| node_fps
node_main -->|"shows video"| node_display

click node_main "https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/src/main.py"
click node_tracker "https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/src/hand_tracker.py"
click node_gestures "https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/src/main.py"
click node_controller "https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/src/gesture_controller.py"
click node_smoothing "https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/utils/smoothing.py"
click node_overlays "https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/src/gesture_controller.py"
click node_fps "https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/src/main.py"

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_main,node_gestures,node_fps,node_user toneBlue
class node_tracker toneAmber
class node_controller,node_smoothing,node_overlays toneMint
class node_camera,node_display,node_desktop toneIndigo
```

## Components

### Frame Application

- [Frame Loop](https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/src/main.py): `src/main.py`
- [Gesture Rules](https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/src/main.py): `src/main.py`
- [FPS and Mode](https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/src/main.py): `src/main.py`

### Hand Perception

- [Hand Tracker](https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/src/hand_tracker.py): `src/hand_tracker.py`

### Gesture Control

- [Action Controller](https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/src/gesture_controller.py): `src/gesture_controller.py`
- [Smoothing Filters](https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/utils/smoothing.py): `utils/smoothing.py`
- [Volume Indicator](https://github.com/syntherat/hand-gesture-controlled-system-cv-project/blob/main/src/gesture_controller.py): `src/gesture_controller.py`

### Other components

- **User**
- **Webcam**
- **Video Display**
- **Desktop Controls**

## Connections

- User → Frame Loop: starts (evidence: `README.md`)
- Frame Loop → Webcam: reads frames (evidence: `src/main.py`)
- Frame Loop → Hand Tracker: processes frames (evidence: `src/main.py`)
- Hand Tracker → Frame Loop: returns landmarks (evidence: `src/main.py`)
- Frame Loop → Gesture Rules: interprets landmarks (evidence: `src/main.py`)
- Gesture Rules → Action Controller: dispatches actions (evidence: `src/main.py`)
- Action Controller → Smoothing Filters: smooths values (evidence: `src/gesture_controller.py`)
- Action Controller → Desktop Controls: moves and clicks (evidence: `src/gesture_controller.py`)
- Action Controller → Desktop Controls: presses volume keys (evidence: `src/gesture_controller.py`)
- Frame Loop → Action Controller: draws indicator (evidence: `src/main.py`)
- Frame Loop → FPS and Mode: updates status (evidence: `src/main.py`)
- Frame Loop → Video Display: shows video (evidence: `src/main.py`)
