Created
February 15, 2026 17:39
-
-
Save fbehrens/1c23aafffbc456ad5039cc0670e5a35a to your computer and use it in GitHub Desktop.
plan for arcyll app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Image Quality Validator — Architekturplan | |
| ## Context | |
| Tool zur Validierung von Digitalisierungsqualität. Erkennt Farbtargets (ColorChecker SG/Classic, Custom) in RAW/TIFF-Bildern, misst Farbwerte, validiert gegen FADGI, Metamorfoze, ISO 19264, ISO 12647. Output: PDF+HTML Reports. Electron-App mit Svelte Frontend, Python Backend. | |
| ## Stack | |
| - **Backend**: Python 3.12+ / FastAPI | |
| - **Frontend**: Electron + Svelte + TypeScript | |
| - **Farbwissenschaft**: ArgyllCMS CLI-Tools (scanin, colverify, etc.) als Subprocess | |
| - **Bildverarbeitung**: OpenCV, rawpy (RAW), Pillow (TIFF) | |
| - **Target-Erkennung**: OpenCV (Konturen, Template Matching) | |
| - **Reports**: Jinja2 Templates → HTML → WeasyPrint → PDF | |
| - **IPC**: Electron ↔ Python via localhost HTTP (FastAPI) | |
| ## Projektstruktur | |
| ``` | |
| niklas/ | |
| ├── backend/ | |
| │ ├── main.py # FastAPI entry | |
| │ ├── requirements.txt | |
| │ ├── core/ | |
| │ │ ├── image_loader.py # RAW/TIFF laden | |
| │ │ ├── target_detector.py # Target im Bild finden | |
| │ │ ├── patch_extractor.py # Farbwerte aus Patches extrahieren | |
| │ │ ├── argyll_wrapper.py # ArgyllCMS CLI aufrufen | |
| │ │ └── color_math.py # Delta E, Farbkonvertierung (Fallback ohne Argyll) | |
| │ ├── standards/ | |
| │ │ ├── fadgi.py # FADGI Star-Rating Schwellwerte | |
| │ │ ├── metamorfoze.py # Metamorfoze Toleranzen | |
| │ │ ├── iso_19264.py # ISO 19264 Grenzwerte | |
| │ │ └── iso_12647.py # ISO 12647 Grenzwerte | |
| │ ├── targets/ | |
| │ │ ├── colorchecker_sg.py # 140 Felder, Referenzwerte, Layout | |
| │ │ ├── colorchecker_classic.py # 24 Felder | |
| │ │ └── custom_target.py # Benutzerdefinierte Targets | |
| │ ├── reports/ | |
| │ │ ├── generator.py # Report-Erstellung | |
| │ │ └── templates/ | |
| │ │ └── report.html.j2 # Jinja2 Template | |
| │ └── api/ | |
| │ ├── routes.py # REST Endpoints | |
| │ └── schemas.py # Pydantic Models | |
| ├── frontend/ | |
| │ ├── package.json | |
| │ ├── electron/ | |
| │ │ └── main.ts # Electron Main Process | |
| │ ├── src/ | |
| │ │ ├── App.svelte | |
| │ │ ├── lib/ | |
| │ │ │ ├── ImageViewer.svelte # Bildanzeige + Target-Overlay | |
| │ │ │ ├── ResultsPanel.svelte # Delta-E Tabelle, Pass/Fail | |
| │ │ │ ├── TargetSelector.svelte # Target-Typ wählen | |
| │ │ │ └── ReportView.svelte # Report-Vorschau | |
| │ │ └── stores/ | |
| │ │ └── analysis.ts # Svelte Store für Analysedaten | |
| │ └── static/ | |
| └── CLAUDE.md | |
| ``` | |
| ## Implementierungsphasen | |
| ### Phase 1: Backend-Kern (MVP) | |
| 1. **Image Loader** — RAW (rawpy/libraw) + TIFF (Pillow) laden, zu numpy array | |
| 2. **Target-Erkennung** — OpenCV: Bild → Graustufen → Schwellwert → Konturen → Raster erkennen. Fallback: manuelle Positionsangabe (x,y,w,h + Zeilen×Spalten) | |
| 3. **Patch-Extraktion** — Mittlere Farbwerte pro Feld (RGB→Lab via colour-science oder ArgyllCMS) | |
| 4. **ArgyllCMS Wrapper** — `scanin` zum Einlesen, `colverify` zum Vergleichen gegen Referenz | |
| 5. **Delta-E Berechnung** — ΔE*ab, ΔE00 pro Patch | |
| ### Phase 2: Standards-Validierung | |
| 6. **FADGI** — 4-Sterne-System: Tone Response, White Balance, Color Accuracy (ΔE00), Noise, Illumination Uniformity | |
| 7. **Metamorfoze** — Strict/Light: ΔE-Toleranzen, Lichthomogenität, Auflösung | |
| 8. **ISO 19264** — Digitalisierungsqualität Kulturerbe: ΔE-Grenzwerte, OECF | |
| 9. **ISO 12647** — Druckproduktion: Farbabweichung Prozessfarben | |
| ### Phase 3: Reports | |
| 10. **HTML-Report** — Jinja2 Template: Übersicht, Patch-Grid mit Soll/Ist, ΔE-Heatmap, Pass/Fail pro Standard | |
| 11. **PDF-Report** — WeasyPrint aus HTML generieren | |
| ### Phase 4: Electron-App | |
| 12. **Electron + Svelte Setup** — electron-builder, Svelte + Vite | |
| 13. **Python-Backend starten** — Electron startet FastAPI als Child Process | |
| 14. **UI** — Drag&Drop Bildupload, Target-Auswahl, Live-Vorschau, Report-Download | |
| ### Phase 5: Polish | |
| 15. Batch-Verarbeitung mehrerer Bilder | |
| 16. Target-Datenbank (JSON) für Custom Targets | |
| 17. Einstellungen (Sprache DE/EN, Standard-Auswahl) | |
| ## Referenzdaten benötigt | |
| - ColorChecker SG: 140 Lab-Referenzwerte (aus ArgyllCMS `.cht`/`.cie` Dateien) | |
| - ColorChecker Classic: 24 Lab-Referenzwerte | |
| - FADGI/Metamorfoze Schwellwerte (öffentlich dokumentiert) | |
| ## Verifizierung | |
| - Unit Tests: Bekannte Referenzbilder mit ColorChecker → erwartete ΔE-Werte | |
| - Integration: Gesamtpipeline Bild → Report | |
| - E2E: Electron App öffnen, Bild laden, Report generieren | |
| ## Offene Fragen | |
| 1. Ist ArgyllCMS bereits auf deinem System installiert? (`which scanin`) | |
| 2. Hast du Testbilder (RAW/TIFF mit ColorChecker SG) zum Entwickeln? | |
| 3. Soll die App mehrsprachig sein (DE/EN) oder nur Deutsch? | |
| 4. Lizenzmodell des fertigen Programms? (relevant wegen ArgyllCMS AGPL) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment