68 lines
2.2 KiB
Markdown
68 lines
2.2 KiB
Markdown
# 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**: capture a cap with camera, auto-detect dominant center color, store cropped thumbnail
|
||
- 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 Floyd–Steinberg 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
|