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>
This commit is contained in:
1 parent
41baa25a01
commit
55a25ba978
10 files changed
+135
-36
No files matched your search
Vendored
+2
-2
@@ -16,7 +16,6 @@ To add one:
|
||||
{
|
||||
"file": "plywood-1.jpg",
|
||||
"threshold": null,
|
||||
"invert": false,
|
||||
"seed": null,
|
||||
"pxPerMm": 3.21,
|
||||
"expected": { "widthMm": 412, "heightMm": 287, "holes": 2 },
|
||||
@@ -24,4 +23,5 @@ To add one:
|
||||
}
|
||||
```
|
||||
|
||||
`threshold: null` means Otsu's automatic value. `seed` is `{ "x": ..., "y": ... }` or `null`.
|
||||
`threshold: null` means Otsu's automatic value. `holes` is optional; leave it out when
|
||||
background texture creates noise holes. Without a known scale, use `pxPerMm: 1` and sizes in px. `seed` is `{ "x": ..., "y": ... }` or `null`.
|
||||
Reference in new issue
Block a user