# yatheendra-source/photographers-problem architecture

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

- Interactive diagram: https://gitdiagram.com/yatheendra-source/photographers-problem
- Repository: https://github.com/yatheendra-source/photographers-problem

## Overview

This repository is a four-task image watermarking assignment. The main workflow embeds a QR watermark in cover images, recovers it, and evaluates image fidelity; later tasks test recovery after Gaussian noise or JPEG compression. The sampled code supports the task-to-algorithm and metric calls shown below. Inputs and plotted results are represented at a high level; unsampled task code and the uninspected threshold-check script are not expanded.

Main entry points: [`task2.py`](https://github.com/yatheendra-source/photographers-problem/blob/main/task2.py) (PSNR evaluation), [`task3.py`](https://github.com/yatheendra-source/photographers-problem/blob/main/task3.py) (Noise robustness run), [`task4.py`](https://github.com/yatheendra-source/photographers-problem/blob/main/task4.py) (JPEG robustness run), [`task1.py`](https://github.com/yatheendra-source/photographers-problem/blob/main/task1.py) (Basic watermark run)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_watermarking["Watermarking"]
  node_task1["Basic watermark run<br/>[task1.py]"]
  node_watermark["SVD embed and recover<br/>[task1.py]"]
end

subgraph group_evaluation["Evaluation"]
  node_task2["PSNR evaluation<br/>[task2.py]"]
  node_psnr["PSNR metric<br/>[task2.py]"]
end

subgraph group_robustness["Robustness tests"]
  node_task3["Noise robustness run<br/>[task3.py]"]
  node_task4["JPEG robustness run<br/>[task4.py]"]
end

node_user(("Assignment user"))
node_image_inputs["Cover and watermark images"]
node_plots["Plots and metrics"]

node_user -->|"runs"| node_task1
node_user -->|"runs"| node_task2
node_user -->|"runs"| node_task3
node_user -->|"runs"| node_task4
node_task1 -->|"loads"| node_image_inputs
node_task1 -->|"embeds and recovers"| node_watermark
node_task1 -->|"saves"| node_plots
node_task2 -->|"loads"| node_image_inputs
node_task2 -->|"calls"| node_watermark
node_task2 -->|"calls"| node_psnr
node_task2 -->|"saves"| node_plots
node_task3 -->|"loads"| node_image_inputs
node_task3 -->|"calls"| node_watermark
node_task3 -->|"calls"| node_psnr
node_task3 -->|"saves"| node_plots
node_task4 -->|"loads"| node_image_inputs
node_task4 -->|"calls"| node_watermark
node_task4 -->|"calls"| node_psnr
node_task4 -->|"saves"| node_plots

click node_task1 "https://github.com/yatheendra-source/photographers-problem/blob/main/task1.py"
click node_watermark "https://github.com/yatheendra-source/photographers-problem/blob/main/task1.py"
click node_task2 "https://github.com/yatheendra-source/photographers-problem/blob/main/task2.py"
click node_psnr "https://github.com/yatheendra-source/photographers-problem/blob/main/task2.py"
click node_task3 "https://github.com/yatheendra-source/photographers-problem/blob/main/task3.py"
click node_task4 "https://github.com/yatheendra-source/photographers-problem/blob/main/task4.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_task1,node_watermark,node_user toneBlue
class node_task2,node_psnr toneAmber
class node_task3,node_task4 toneMint
class node_image_inputs,node_plots toneIndigo
```

## Components

### Watermarking

- [Basic watermark run](https://github.com/yatheendra-source/photographers-problem/blob/main/task1.py): `task1.py`
- [SVD embed and recover](https://github.com/yatheendra-source/photographers-problem/blob/main/task1.py): `task1.py`

### Evaluation

- [PSNR evaluation](https://github.com/yatheendra-source/photographers-problem/blob/main/task2.py): `task2.py`
- [PSNR metric](https://github.com/yatheendra-source/photographers-problem/blob/main/task2.py): `task2.py`

### Robustness tests

- [Noise robustness run](https://github.com/yatheendra-source/photographers-problem/blob/main/task3.py): `task3.py`
- [JPEG robustness run](https://github.com/yatheendra-source/photographers-problem/blob/main/task4.py): `task4.py`

### Other components

- **Assignment user**
- **Cover and watermark images**
- **Plots and metrics**

## Connections

- Assignment user → Basic watermark run: runs (evidence: `README.md`)
- Assignment user → PSNR evaluation: runs (evidence: `README.md`)
- Assignment user → Noise robustness run: runs (evidence: `README.md`)
- Assignment user → JPEG robustness run: runs (evidence: `README.md`)
- Basic watermark run → Cover and watermark images: loads (evidence: `task1.py`)
- Basic watermark run → SVD embed and recover: embeds and recovers (evidence: `task1.py`)
- Basic watermark run → Plots and metrics: saves (evidence: `task1.py`)
- PSNR evaluation → Cover and watermark images: loads (evidence: `task2.py`)
- PSNR evaluation → SVD embed and recover: calls (evidence: `task2.py`)
- PSNR evaluation → PSNR metric: calls (evidence: `task2.py`)
- PSNR evaluation → Plots and metrics: saves (evidence: `task2.py`)
- Noise robustness run → Cover and watermark images: loads (evidence: `task3.py`)
- Noise robustness run → SVD embed and recover: calls (evidence: `task3.py`)
- Noise robustness run → PSNR metric: calls (evidence: `task3.py`)
- Noise robustness run → Plots and metrics: saves (evidence: `task3.py`)
- JPEG robustness run → Cover and watermark images: loads (evidence: `task4.py`)
- JPEG robustness run → SVD embed and recover: calls (evidence: `task4.py`)
- JPEG robustness run → PSNR metric: calls (evidence: `task4.py`)
- JPEG robustness run → Plots and metrics: saves (evidence: `task4.py`)
