# ajanthadevi2012/hand-gesture-2-hands---roi architecture

> Architecture diagram of the GitHub repository ajanthadevi2012/hand-gesture-2-hands---roi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ajanthadevi2012/hand-gesture-2-hands---roi
- Repository: https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi

## Overview

This is a notebook-based, real-time two-hand gesture application for selecting and displaying a webcam Region of Interest. Its documented workflow captures and mirrors frames, uses MediaPipe hand landmarks to interpret left- and right-hand pinches as ROI corners, then displays the annotated frame and extracted region while recording processed video. The notebook is the only source file in the tree; relationships below are based on README documentation, not inspected implementation excerpts. The README also names a Python entry point that is absent from the supplied tree.

Main entry points: [`Hand Gesture 2 hands - ROI.ipynb`](https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb) (Frame Annotation), [`two_hand_roi_selection_output.mp4`](https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/two_hand_roi_selection_output.mp4) (Saved Output Video)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_input_tracking["Input and Tracking"]
  node_frame_capture["Frame Capture"]
  node_frame_prep["Frame Preparation"]
  node_mediapipe_hands["MediaPipe Hands"]
  node_landmark_detection["Landmark Detection"]
end

subgraph group_selection_roi["Gesture and ROI"]
  node_pinch_detection["Pinch Detection"]
  node_point_selection["Hand Point Selection"]
  node_roi_creation["ROI Creation"]
  node_roi_extraction["ROI Extraction"]
end

subgraph group_display_recording["Display and Recording"]
  node_frame_annotation["Frame Annotation"]
  node_live_display["Live Display"]
  node_roi_display["ROI Display"]
  node_video_recording["Video Recording"]
  node_saved_video["Saved Output Video"]
  node_keyboard_controls["Keyboard Controls"]
end

node_operator(("Operator"))
node_webcam["System Webcam"]

node_operator -->|"provides input"| node_webcam
node_webcam -->|"supplies frames"| node_frame_capture
node_frame_capture -->|"passes frames"| node_frame_prep
node_frame_prep -->|"processes frames"| node_mediapipe_hands
node_mediapipe_hands -->|"detects landmarks"| node_landmark_detection
node_landmark_detection -->|"provides hand landmarks"| node_pinch_detection
node_pinch_detection -->|"signals pinches"| node_point_selection
node_point_selection -->|"sets two points"| node_roi_creation
node_roi_creation -->|"defines bounds"| node_roi_extraction
node_roi_creation -->|"draws rectangle"| node_frame_annotation
node_landmark_detection -->|"draws landmarks"| node_frame_annotation
node_frame_annotation -->|"displays frame"| node_live_display
node_roi_extraction -->|"displays region"| node_roi_display
node_frame_annotation -->|"records processed frame"| node_video_recording
node_video_recording -->|"saves video"| node_saved_video
node_operator -->|"presses keys"| node_keyboard_controls
node_keyboard_controls -->|"resets points"| node_point_selection
node_keyboard_controls -->|"quits and saves"| node_video_recording

click node_frame_capture "https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb"
click node_frame_prep "https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb"
click node_landmark_detection "https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb"
click node_pinch_detection "https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb"
click node_point_selection "https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb"
click node_roi_creation "https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb"
click node_roi_extraction "https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb"
click node_frame_annotation "https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb"
click node_live_display "https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb"
click node_roi_display "https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb"
click node_video_recording "https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb"
click node_saved_video "https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/two_hand_roi_selection_output.mp4"
click node_keyboard_controls "https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb"

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_frame_capture,node_frame_prep,node_mediapipe_hands,node_landmark_detection toneBlue
class node_pinch_detection,node_point_selection,node_roi_creation,node_roi_extraction toneAmber
class node_frame_annotation,node_live_display,node_roi_display,node_video_recording,node_saved_video,node_keyboard_controls toneMint
class node_operator,node_webcam toneIndigo
```

## Components

### Input and Tracking

- [Frame Capture](https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb): `Hand Gesture 2 hands - ROI.ipynb`
- [Frame Preparation](https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb): `Hand Gesture 2 hands - ROI.ipynb`
- **MediaPipe Hands**
- [Landmark Detection](https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb): `Hand Gesture 2 hands - ROI.ipynb`

### Gesture and ROI

- [Pinch Detection](https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb): `Hand Gesture 2 hands - ROI.ipynb`
- [Hand Point Selection](https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb): `Hand Gesture 2 hands - ROI.ipynb`
- [ROI Creation](https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb): `Hand Gesture 2 hands - ROI.ipynb`
- [ROI Extraction](https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb): `Hand Gesture 2 hands - ROI.ipynb`

### Display and Recording

- [Frame Annotation](https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb): `Hand Gesture 2 hands - ROI.ipynb`
- [Live Display](https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb): `Hand Gesture 2 hands - ROI.ipynb`
- [ROI Display](https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb): `Hand Gesture 2 hands - ROI.ipynb`
- [Video Recording](https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb): `Hand Gesture 2 hands - ROI.ipynb`
- [Saved Output Video](https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/two_hand_roi_selection_output.mp4): `two_hand_roi_selection_output.mp4`
- [Keyboard Controls](https://github.com/ajanthadevi2012/hand-gesture-2-hands---roi/blob/main/Hand%20Gesture%202%20hands%20-%20ROI.ipynb): `Hand Gesture 2 hands - ROI.ipynb`

### Other components

- **Operator**
- **System Webcam**

## Connections

- Operator → System Webcam: provides input (evidence: `README.md`)
- System Webcam → Frame Capture: supplies frames (evidence: `README.md`)
- Frame Capture → Frame Preparation: passes frames (evidence: `README.md`)
- Frame Preparation → MediaPipe Hands: processes frames (evidence: `README.md`)
- MediaPipe Hands → Landmark Detection: detects landmarks (evidence: `README.md`)
- Landmark Detection → Pinch Detection: provides hand landmarks (evidence: `README.md`)
- Pinch Detection → Hand Point Selection: signals pinches (evidence: `README.md`)
- Hand Point Selection → ROI Creation: sets two points (evidence: `README.md`)
- ROI Creation → ROI Extraction: defines bounds (evidence: `README.md`)
- ROI Creation → Frame Annotation: draws rectangle (evidence: `README.md`)
- Landmark Detection → Frame Annotation: draws landmarks (evidence: `README.md`)
- Frame Annotation → Live Display: displays frame (evidence: `README.md`)
- ROI Extraction → ROI Display: displays region (evidence: `README.md`)
- Frame Annotation → Video Recording: records processed frame (evidence: `README.md`)
- Video Recording → Saved Output Video: saves video (evidence: `README.md`)
- Operator → Keyboard Controls: presses keys (evidence: `README.md`)
- Keyboard Controls → Hand Point Selection: resets points (evidence: `README.md`)
- Keyboard Controls → Video Recording: quits and saves (evidence: `README.md`)
