# althafshaik15/gesturecontrol architecture

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

- Interactive diagram: https://gitdiagram.com/althafshaik15/gesturecontrol
- Repository: https://github.com/althafshaik15/gesturecontrol

## Overview

GestureControls is a webcam-driven desktop gesture-control application. Its workflow captures frames, detects and annotates hands, classifies landmarks, maps gestures to desktop actions, and displays a live HUD. The controller also supports scrolling, clicks, volume, brightness, screenshots, and media playback. The README is empty, so this map relies on the supplied source; external integrations are shown only where those files invoke them.

Main entry points: [`controller.py`](https://github.com/althafshaik15/gesturecontrol/blob/main/controller.py) (Gesture Controller), [`main.py`](https://github.com/althafshaik15/gesturecontrol/blob/main/main.py) (App Loop and HUD), [`gesture_detector.py`](https://github.com/althafshaik15/gesturecontrol/blob/main/gesture_detector.py) (Hand Detector), [`gesture_classifier.py`](https://github.com/althafshaik15/gesturecontrol/blob/main/gesture_classifier.py) (Gesture Classifier)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application Runtime"]
  node_main["App Loop and HUD<br/>[main.py]"]
end

subgraph group_vision["Hand Vision"]
  node_detector["Hand Detector"]
end

subgraph group_recognition["Gesture Recognition"]
  node_classifier["Gesture Classifier"]
  node_config["Gesture Config<br/>[config.py]"]
end

subgraph group_actions["Desktop Actions"]
  node_controller["Gesture Controller<br/>[controller.py]"]
end

node_user(("User"))
node_opencv["OpenCV"]
node_camera["Webcam"]
node_mediapipe["MediaPipe Hands"]
node_desktop["Desktop Input"]
node_audio["Windows Audio"]
node_brightness["Screen Brightness"]
node_media["Media Keys"]

node_user -->|"shows gestures"| node_camera
node_main -->|"captures and displays"| node_opencv
node_camera -->|"provides frames"| node_opencv
node_main -->|"processes frames"| node_detector
node_detector -->|"converts frames"| node_opencv
node_detector -->|"detects hands"| node_mediapipe
node_detector -->|"returns landmarks"| node_main
node_main -->|"classifies landmarks"| node_classifier
node_classifier -->|"reads thresholds and indices"| node_config
node_main -->|"dispatches gesture"| node_controller
node_controller -->|"reads control settings"| node_config
node_controller -->|"moves, clicks, scrolls, screenshots"| node_desktop
node_controller -->|"adjusts volume"| node_audio
node_controller -->|"raises brightness"| node_brightness
node_controller -->|"sends play/pause"| node_media

click node_main "https://github.com/althafshaik15/gesturecontrol/blob/main/main.py"
click node_detector "https://github.com/althafshaik15/gesturecontrol/blob/main/gesture_detector.py"
click node_classifier "https://github.com/althafshaik15/gesturecontrol/blob/main/gesture_classifier.py"
click node_config "https://github.com/althafshaik15/gesturecontrol/blob/main/config.py"
click node_controller "https://github.com/althafshaik15/gesturecontrol/blob/main/controller.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_user,node_brightness toneBlue
class node_detector toneAmber
class node_classifier,node_config,node_mediapipe toneMint
class node_controller toneRose
class node_opencv,node_camera,node_desktop,node_audio,node_media toneIndigo
```

## Components

### Application Runtime

- [App Loop and HUD](https://github.com/althafshaik15/gesturecontrol/blob/main/main.py): `main.py`

### Hand Vision

- [Hand Detector](https://github.com/althafshaik15/gesturecontrol/blob/main/gesture_detector.py): `gesture_detector.py`

### Gesture Recognition

- [Gesture Classifier](https://github.com/althafshaik15/gesturecontrol/blob/main/gesture_classifier.py): `gesture_classifier.py`
- [Gesture Config](https://github.com/althafshaik15/gesturecontrol/blob/main/config.py): `config.py`

### Desktop Actions

- [Gesture Controller](https://github.com/althafshaik15/gesturecontrol/blob/main/controller.py): `controller.py`

### Other components

- **User**
- **OpenCV**
- **Webcam**
- **MediaPipe Hands**
- **Desktop Input**
- **Windows Audio**
- **Screen Brightness**
- **Media Keys**

## Connections

- User → Webcam: shows gestures
- App Loop and HUD → OpenCV: captures and displays
- Webcam → OpenCV: provides frames
- App Loop and HUD → Hand Detector: processes frames
- Hand Detector → OpenCV: converts frames
- Hand Detector → MediaPipe Hands: detects hands
- Hand Detector → App Loop and HUD: returns landmarks
- App Loop and HUD → Gesture Classifier: classifies landmarks
- Gesture Classifier → Gesture Config: reads thresholds and indices
- App Loop and HUD → Gesture Controller: dispatches gesture
- Gesture Controller → Gesture Config: reads control settings
- Gesture Controller → Desktop Input: moves, clicks, scrolls, screenshots
- Gesture Controller → Windows Audio: adjusts volume
- Gesture Controller → Screen Brightness: raises brightness
- Gesture Controller → Media Keys: sends play/pause
