Files
korken_mosaic/README.md

69 lines
2.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Korken Mosaic (Flutter MVP)
Prototype Flutter app for generating bottle-cap mosaics from imported images.
## Features
- Import target image from gallery (`image_picker`)
- Resolution controls:
- explicit grid width/height
- or auto grid by approximate cap size in source image pixels
- Persistent **Cap Catalog** (local JSON in app documents directory):
- each entry stores `name`, `color` (hex/swatch), and optional preview image path
- survives app restarts
- Catalog management:
- add entries manually (name + hex/color picker + optional photo)
- **Deckel fotografieren**: robust circular cap detection (edge-based circle search with fallback), color is computed only from masked cap interior pixels
- selectable extraction mode in photo review dialog: **Dominante Farbe** or **Durchschnitt**
- dedicated catalog browser with **list/grid** modes
- edit existing entry name/color
- delete entries (with thumbnail cleanup)
- Mosaic preview + bill of materials counts per cap color
- Mosaic palette source is always the current catalog entries
## Style controls (new)
User-facing controls are integrated directly in the main screen:
- **Fidelity ↔ Structure** slider
- fidelity side keeps direct color faithfulness
- structure side applies edge-aware smoothing for cleaner large forms
- **Dithering strength** slider
- scales FloydSteinberg error diffusion
- **Edge emphasis** slider
- boosts edge readability during color assignment
- **Color tolerance / variation** slider
- allows controlled variation among similar cap colors in flatter regions
## Presets
Three presets are provided and selectable via segmented buttons:
- **Realistisch**
- **Ausgewogen**
- **Künstlerisch**
Selecting a preset sets all four style controls at once.
## Pipeline notes
The generation pipeline still uses fast CIELAB (`DeltaE CIE76`) nearest-color matching,
with precomputed palette LAB values, LAB caching, and low-cost edge-aware processing to keep performance responsive.
## Build (arm64 split debug)
```bash
cd /home/yadciel/.openclaw/workspace/korken_mosaic
flutter pub get
flutter build apk --debug --split-per-abi
```
Expected arm64 artifact:
`build/app/outputs/flutter-apk/app-arm64-v8a-debug.apk`
## Main files
- `lib/main.dart` UI + mosaic logic
- `README.md` overview and build instructions