# riyasibil/motionsecuritysystem architecture

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

- Interactive diagram: https://gitdiagram.com/riyasibil/motionsecuritysystem
- Repository: https://github.com/riyasibil/motionsecuritysystem

## Overview

MotionSecuritySystem captures camera frames, periodically processes them to locate the largest fish contour, and forms a dynamic password from its coordinates. The single Java file contains the runtime entry point, camera handling, tracking and password logic. The graph separates these responsibilities within that file; OpenCV is an external dependency. No separate persistence or GUI dashboard is present. Relationships are based on the shown source; the README confirms the overall workflow.

Main entry points: [`FishTrackingSystem.java`](https://github.com/riyasibil/motionsecuritysystem/blob/main/FishTrackingSystem.java) (Capture loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("System operator"))
node_main["Capture loop"]
node_camera_mgr["Camera manager"]
node_camera(("Camera device"))
node_tracker["Fish tracker"]
node_password["Password generation"]
node_opencv["OpenCV"]

node_user -->|"starts"| node_main
node_main -->|"starts camera"| node_camera_mgr
node_camera_mgr -->|"opens and reads"| node_camera
node_camera_mgr -->|"returns frames"| node_main
node_main -->|"processes frame"| node_tracker
node_tracker -->|"processes image"| node_opencv
node_tracker -->|"forms coordinate password"| node_password
node_main -->|"displays feed"| node_opencv

click node_main "https://github.com/riyasibil/motionsecuritysystem/blob/main/FishTrackingSystem.java"
click node_camera_mgr "https://github.com/riyasibil/motionsecuritysystem/blob/main/FishTrackingSystem.java"
click node_tracker "https://github.com/riyasibil/motionsecuritysystem/blob/main/FishTrackingSystem.java"
click node_password "https://github.com/riyasibil/motionsecuritysystem/blob/main/FishTrackingSystem.java"

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_user,node_camera,node_opencv toneIndigo
class node_main,node_camera_mgr,node_tracker,node_password toneTeal
```

## Components

### Other components

- **System operator**
- [Capture loop](https://github.com/riyasibil/motionsecuritysystem/blob/main/FishTrackingSystem.java): `FishTrackingSystem.java`
- [Camera manager](https://github.com/riyasibil/motionsecuritysystem/blob/main/FishTrackingSystem.java): `FishTrackingSystem.java`
- **Camera device**
- [Fish tracker](https://github.com/riyasibil/motionsecuritysystem/blob/main/FishTrackingSystem.java): `FishTrackingSystem.java`
- [Password generation](https://github.com/riyasibil/motionsecuritysystem/blob/main/FishTrackingSystem.java): `FishTrackingSystem.java`
- **OpenCV**

## Connections

- System operator → Capture loop: starts (evidence: `FishTrackingSystem.java`)
- Capture loop → Camera manager: starts camera (evidence: `FishTrackingSystem.java`)
- Camera manager → Camera device: opens and reads (evidence: `FishTrackingSystem.java`)
- Camera manager → Capture loop: returns frames (evidence: `FishTrackingSystem.java`)
- Capture loop → Fish tracker: processes frame (evidence: `FishTrackingSystem.java`)
- Fish tracker → OpenCV: processes image (evidence: `FishTrackingSystem.java`)
- Fish tracker → Password generation: forms coordinate password (evidence: `FishTrackingSystem.java`)
- Capture loop → OpenCV: displays feed (evidence: `FishTrackingSystem.java`)
