15 Commits
Author SHA1 Message Date
immortaly007andClaude Opus 5.5 353577d5ec perf: cache the detected piece so margin changes only re-trace it
Margin slider steps drop from ~800 ms to under 70 ms in the browser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:30:12 +02:00
immortaly007andClaude Opus 5.5 e925ce66d5 feat: trim textured background (wood grain) touching a smooth piece
Keep the piece's smooth core, then grow it back to restore the true edges.
Removes the wood-knot and grain leaks on the MDF-on-floor photo. Pieces that
are textured themselves are left untouched.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:25:53 +02:00
immortaly007andClaude Opus 5.5 077c3cc31d perf: prepare the lighting-corrected image once per photo
Threshold, click, scale and margin changes now reuse it, so each update
skips the ~200 ms grayscale and lighting fit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:22:36 +02:00
immortaly007andClaude Opus 5.5 8ea525a1e8 fix: apply the safety margin with a distance transform
An elliptical erode kernel costs radius² per pixel. While typing a length,
an intermediate value like "3" mm made the margin hundreds of pixels and
froze the page for minutes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:21:42 +02:00
immortaly007andClaude Opus 5.5 55a25ba978 feat: correct uneven lighting and pick polarity automatically
Fit the background brightness from the photo border and subtract it, so
side-lit photos threshold cleanly. The clicked pixel (or, without a click,
the border) decides whether the piece is darker or lighter, replacing the
invert checkbox. Adds the MDF-on-wood-floor photo as a regression fixture.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:12:16 +02:00
immortaly007andClaude Opus 5.5 41baa25a01 fix: drop glare holes before the margin and never auto-pick specks
Filtering holes after the margin let -2 mm grow 1 mm specks past the
3 mm cutoff, and could drop real holes shrunk by a positive margin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 15:07:16 +02:00
immortaly007andClaude Opus 5.5 4b19c7ea4e feat: add AppState with click routing and derived detection/export
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:46:28 +02:00
immortaly007andClaude Opus 5.5 99cafc0b55 feat: add view transform, photo loading and download helpers
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:45:38 +02:00
immortaly007andClaude Opus 5.5 0a97cb88af test: add real-photo fixture harness for detection regressions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:45:10 +02:00
immortaly007andClaude Opus 5.5 fad7deed5d feat: run manual polygons through the shared margin pipeline
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:44:35 +02:00
immortaly007andClaude Opus 5.5 9e48c5d762 feat: detect piece outline with threshold, seed selection and margin
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:44:15 +02:00
immortaly007andClaude Opus 5.5 5e4eebaaa2 feat: add OpenCV loader, Otsu threshold and margin-aware mask tracing
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:43:41 +02:00
immortaly007andClaude Opus 5.5 8d597e856e feat: add DXF (R12) and SVG exporters
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:39:29 +02:00
immortaly007andClaude Opus 5.5 b142c4f766 feat: add geometry helpers for mm conversion, simplification and export prep
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:38:59 +02:00
immortaly007andClaude Opus 5.5 a39122c504 feat: scaffold Svelte app with shared types and scale calculation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 14:38:22 +02:00