feat(recipe): ship archival-fidelity form-scan chain (MK-19) #36

Merged
David merged 1 commit from feat/recipe-form-scan-archival-MK-19 into main 2026-05-24 18:39:17 +02:00
Owner

Summary

Replaces the MK-18 passthrough stub at src/image/recipes/form-scan.toml with the archival-fidelity chain spec'd in MK-19: deskew -> despeckle (conservative threshold/radius) -> constrained-sharpen (light, edge-aware). The chain preserves the FM-screened mid-tone panels for human review while still correcting sheet-fed skew, removing CCD speckle, and tightening text outside the panels.

OCR-prep stays out of scope: re-run monkey image auto with --class binary-scan on the archival output when binarising is needed.

What changed

  • src/image/recipes/form-scan.toml: three-step chain replaces the passthrough stub.
  • Inline TOML comments document (a) the role of each step on a form scan and (b) every filter excluded on purpose (contrast-stretch, local-contrast, boost-screen, vivid-screen, stamp, sharp-abstract) along with the failure mode for each.

No code changes outside the recipe file.

Acceptance criteria status (from MK-19)

  • Three-step chain present with parameters per the Proposed approach section.
  • every_embedded_recipe_parses passes (cargo test every_embedded_recipe_parses).
  • just check (fmt + clippy + build + Docker stage) passes.
  • No code changes outside the recipe file.
  • Inline TOML comments cover step intent and excluded-filter rationale.
  • monkey image auto <fixture> /tmp/out.png --class form-scan against tests/fixtures/classify/form-scan/: not verifiable in this environment. The fixtures directory is gitignored (tests/fixtures/ per .gitignore) and no fixtures are checked out locally. Reviewer with a populated fixture tree can validate by running just classify-fixtures or the explicit monkey image auto command above.
  • Visual spot-check (before/after PNGs in PR): same blocker as above. Reviewer to attach after running against the local fixture corpus.

Test plan

  • cargo test every_embedded_recipe_parses
  • just check
  • Reviewer: monkey image auto against the 1099-MISC / 1099-NEC / vehicle-inspection fixtures, confirm panels remain visually mid-tone (not crushed toward white), attach before/after PNGs.

Closes MK-19.

## Summary Replaces the MK-18 passthrough stub at `src/image/recipes/form-scan.toml` with the archival-fidelity chain spec'd in MK-19: `deskew` -> `despeckle` (conservative threshold/radius) -> `constrained-sharpen` (light, edge-aware). The chain preserves the FM-screened mid-tone panels for human review while still correcting sheet-fed skew, removing CCD speckle, and tightening text outside the panels. OCR-prep stays out of scope: re-run `monkey image auto` with `--class binary-scan` on the archival output when binarising is needed. ## What changed - `src/image/recipes/form-scan.toml`: three-step chain replaces the passthrough stub. - Inline TOML comments document (a) the role of each step on a form scan and (b) every filter excluded on purpose (`contrast-stretch`, `local-contrast`, `boost-screen`, `vivid-screen`, `stamp`, `sharp-abstract`) along with the failure mode for each. No code changes outside the recipe file. ## Acceptance criteria status (from MK-19) - [x] Three-step chain present with parameters per the Proposed approach section. - [x] `every_embedded_recipe_parses` passes (`cargo test every_embedded_recipe_parses`). - [x] `just check` (fmt + clippy + build + Docker stage) passes. - [x] No code changes outside the recipe file. - [x] Inline TOML comments cover step intent and excluded-filter rationale. - [ ] `monkey image auto <fixture> /tmp/out.png --class form-scan` against `tests/fixtures/classify/form-scan/`: not verifiable in this environment. The fixtures directory is gitignored (`tests/fixtures/` per `.gitignore`) and no fixtures are checked out locally. Reviewer with a populated fixture tree can validate by running `just classify-fixtures` or the explicit `monkey image auto` command above. - [ ] Visual spot-check (before/after PNGs in PR): same blocker as above. Reviewer to attach after running against the local fixture corpus. ## Test plan - [x] `cargo test every_embedded_recipe_parses` - [x] `just check` - [ ] Reviewer: `monkey image auto` against the 1099-MISC / 1099-NEC / vehicle-inspection fixtures, confirm panels remain visually mid-tone (not crushed toward white), attach before/after PNGs. Closes MK-19.
feat(recipe): ship archival-fidelity form-scan chain (MK-19)
All checks were successful
Check / fmt + clippy + build + tests (pull_request) Successful in 19s
Create release / Create release from merged PR (pull_request) Has been skipped
8907947beb
Replace the MK-18 passthrough stub with a three-step chain (deskew, despeckle, constrained-sharpen) tuned for FM-screened forms. The chain preserves mid-tone panel structure for human review while cleaning sheet-fed skew, CCD speckle, and softening of off-panel text. OCR-prep stays out of scope: re-run `monkey image auto` with `--class binary-scan` on the archival output when binarising is needed.

Inline TOML comments document each step's choice and call out the filters excluded on purpose (`contrast-stretch`, `local-contrast`, `boost-screen`, `vivid-screen`, `stamp`, `sharp-abstract`) plus the failure mode for each.

#MK-19 State Done
David merged commit 3999791e6f into main 2026-05-24 18:39:17 +02:00
David deleted branch feat/recipe-form-scan-archival-MK-19 2026-05-24 18:39:17 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pandoras-box/monkey!36
No description provided.