# dhivya2706/virtual_painter architecture

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

- Interactive diagram: https://gitdiagram.com/dhivya2706/virtual_painter
- Repository: https://github.com/dhivya2706/virtual_painter

## Overview

Virtual Painter is a real-time webcam drawing application. Its documented workflow captures video, detects a selected color in HSV, tracks the object, and draws its movement on a displayed canvas. Users can also select colors and erase or clear the canvas. The repository tree contains only README.md and no source excerpts, so implementation paths and internal call ownership cannot be verified; the graph shows only relationships stated in the README.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_vision["Vision and Tracking"]
  node_capture["Video Capture"]
  node_color_detection["HSV Color Detection"]
  node_tracking["Object Tracking"]
end

subgraph group_drawing["Canvas and Drawing"]
  node_drawing["Motion Drawing"]
  node_canvas["Virtual Canvas"]
end

subgraph group_controls["User Controls"]
  node_color_selection["Color Selection"]
  node_erase_clear["Erase and Clear"]
end

node_user(("User"))
node_webcam["Webcam"]

node_webcam -->|"provides video"| node_capture
node_capture -->|"passes frames"| node_color_detection
node_color_detection -->|"detects object"| node_tracking
node_tracking -->|"provides position"| node_drawing
node_drawing -->|"draws lines"| node_canvas
node_user -->|"selects color"| node_color_selection
node_user -->|"erases or clears"| node_erase_clear
node_user -->|"moves object"| node_drawing

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_capture,node_color_detection,node_tracking,node_user toneBlue
class node_drawing,node_canvas toneAmber
class node_color_selection,node_erase_clear toneMint
class node_webcam toneIndigo
```

## Components

### Vision and Tracking

- **Video Capture**
- **HSV Color Detection**
- **Object Tracking**

### Canvas and Drawing

- **Motion Drawing**
- **Virtual Canvas**

### User Controls

- **Color Selection**
- **Erase and Clear**

### Other components

- **User**
- **Webcam**

## Connections

- Webcam → Video Capture: provides video (evidence: `README.md`)
- Video Capture → HSV Color Detection: passes frames (evidence: `README.md`)
- HSV Color Detection → Object Tracking: detects object (evidence: `README.md`)
- Object Tracking → Motion Drawing: provides position (evidence: `README.md`)
- Motion Drawing → Virtual Canvas: draws lines (evidence: `README.md`)
- User → Color Selection: selects color (evidence: `README.md`)
- User → Erase and Clear: erases or clears (evidence: `README.md`)
- User → Motion Drawing: moves object (evidence: `README.md`)
