# Milestone 2 — Photos Builds on Milestone 1. Spec for calibration math and inventory PNG properties: `docs/CAPTURE.md`. This milestone gets every photo of one slab background-removed and cropped store-ready. It does not fill Complete-listing taxonomy, SKU, price, or copy. It does not create a WooCommerce product. No inference URL. No model. Mask and crop for non-calibration shots reuse the approved calibration params as ordinary client code. ## Goal Phone capture of one slab → a lined-up set of Woo-compatible inventory PNGs, plus Milestone 1 calibration numbers on the reference shot, plus one annotated copy of the calibration PNG with dimension overlays. ## Use case 1. User adds a batch of one or more photos of the same slab (Setup rules from Milestone 1: green or black sheet, top-down reference expectations still apply to the calibration choice). 2. User selects which photo in the batch is the calibration photo. 3. App runs the Milestone 1 workflow on that calibration photo only: Mask → Length axis → Measure (length `L`, thickness, Calculate). 4. After Calculate, the app applies the approved mask sheet and sensitivity, and the same crop rules (3:4 portrait, 90% fill, transparent PNG, shorter-side floor), to every other photo in the batch. 5. App adds a second copy of the calibration inventory PNG with dimension overlays burned in (see Dimension overlay). 6. User sees Photos ready: inventory PNGs lined up in this order — clean calibration PNG, then the dimension-overlay copy of the calibration PNG, then the other batch photos in capture order — plus the Milestone 1 calibration details (widths, sqft, bdft, scale) presented as in Measure. A batch of one photo still works: that photo is the calibration photo; the end set is the clean PNG plus the dimension-overlay copy. ## States (additions over Milestone 1) 1. Batch — add one or more photos; continue when the batch has at least one. 2. Pick calibration — user chooses which batch photo is the reference. 3. Mask / Length axis / Measure — Milestone 1 states on the calibration photo only. 4. Photos ready — lineup order: clean calibration PNG → dimension-overlay copy → other batch photos in capture order; plus Milestone 1 numbers. Device draft restores the last approved state, including the batch and which photo was calibration when those exist. ## Apply to non-calibration photos For each non-calibration photo: - Reuse the approved Mask sheet (Auto / Green / Black) and sensitivity from the calibration photo. Do not re-open Mask controls for that photo in this milestone. - Run background removal with those params; compose inventory PNG with the same crop rules as Milestone 1 Calculate. - If a photo yields an empty mask or fails the PNG size floor, keep it out of the ready set and show a clear per-photo error; other photos still proceed. Scale, widths, sqft, and bdft stay tied to the calibration photo and user `L` / thickness. Non-calibration photos are visual inventory only. ## Dimension overlay A second copy of the **calibration** inventory PNG is added to the collection. Overlays are black, large enough to read on phone and storefront. Orientation follows the **user-approved length axis** from Milestone 1 (not the upright edges of the photo). - **Length:** dimension graphic beside the wood on the right in axis-space (outside the slab edge along the length direction). - **Widths:** stations every 12 in along the approved length axis, starting 6 in from the **bottom** of the slab span, continuing while the station is not within 6 in of the top (stations at 6, 18, 30, … in inches along the axis while ≤ `L − 6`). Each width is drawn across the wood perpendicular to the length axis, with arrow tips on the left and right slab edges and the measurement text on that line. - **Bottom:** after the calibration photo’s EXIF orientation is applied, the bottom edge of that oriented photo establishes which end of the slab is bottom for width stations. Length-axis direction still follows the user-approved Milestone 1 axis; EXIF only picks which end is bottom vs top along that span. ## Photos-ready order 1. Clean calibration inventory PNG 2. Dimension-overlay copy of the calibration PNG 3. Remaining batch inventory PNGs in capture order The clean calibration PNG remains in the set. The annotated copy is extra. ## Acceptance On a phone UAT build: - User can capture 1–N photos, pick calibration, complete Milestone 1 on that shot, and see every successful batch photo as a 3:4 transparent inventory PNG lined up. - Calibration measures match Milestone 1 presentation. - Dimension-overlay copy of the calibration PNG is present with black length and width graphics oriented to the approved axis; width stations start 6 in from EXIF-established bottom. - Lineup order is clean calibration → dimension overlay → other batch photos in capture order. - No Woo create. No inference URL. ## Out of scope - Complete-listing fields (SKU, species, category, edge, figure, grade, thickness band, moisture, `fig-*` / `feat-*`, title, short title, description, price) - WooCommerce create and submission-ready taxonomy (Milestone 3: `docs/CREATE.md`) - Work beyond `docs/CREATE.md` unless Ty expands M3 in chat - Changing Milestone 1 mask/axis/measure math except to reuse its outputs for batch apply and overlays