From 13ab6097e6c2ec29c5097e27d51da3d74afadd0a Mon Sep 17 00:00:00 2001 From: Ty Date: Fri, 11 Sep 2026 13:45:59 +0000 Subject: [PATCH] docs: add live CAPTURE spec on doc-simplification --- docs/CAPTURE.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 docs/CAPTURE.md diff --git a/docs/CAPTURE.md b/docs/CAPTURE.md new file mode 100644 index 0000000..94fe7f2 --- /dev/null +++ b/docs/CAPTURE.md @@ -0,0 +1,41 @@ +# Capture + +Client-side. Phone and PC. This is the hard part of Slice 1. + +## Goal + +Isolate just the slab, with quick visual feedback, then produce: + +1. A uniform inventory PNG for the product page +2. Filterable sizes and board feet from that **reference** photo + +The user’s eye on the overlay is the quality gate. There is no confidence score on the mask. + +## Controls (Slice 1) + +- Sheet: Auto / Green / Black, only if the background is not obvious +- **One** sensitivity slider +- Overlay on the **source** photo, live as the slider moves +- No Apply button, no server round-trip to tune the cut + +If the edge is still wrong after the slider, retake. Extra sliders (edge offset, feather, and so on) are a fallback after real slabs prove one control is not enough. Do not ship four sliders up front. + +## After the user approves the edge + +Then — and only then — run the rest on the client: + +- Length axis from the mask; user can rotate / confirm if it is skewed +- User length `L` (inches, 1/8") is the scale: `scale = longest_axis_px / L` +- Width samples every 6" along that axis (min / max / avg for the listing, not for bdft) +- `sqft = (mask_pixels / scale²) / 144` (2 decimals) +- `bdft = sqft × thickness_in` (2 decimals). Identity: 1 sqft at 1" = 1 bdft +- Inventory PNG: transparent, 3:4 portrait, slab centered, 80% fill at the extremes, shorter side ≥ 1600px when the source allows +- Undersized source: warn and require retake + +User-entered length, thickness, SKU, and price always win over computed values. + +## Proof for this file + +On a real phone, after Approve, the processed PNG and the numbers appear. If Approve does nothing, capture is not done. + +Algorithm detail and test vectors: `docs/archive/TECH-SPEC-PIPELINE.md` (history). Live behavior is this file.