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>
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>
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>
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>