Files
SlabUploader/docs/PHOTOS.md
T
grokbot_ty 4ab68d6b68 docs(m2): lock Photos milestone — batch, calibrate, overlays
Record Ty's narrowed M2 scope on m2-ds: multi-photo batch, pick
calibration, reuse M1 mask/crop, lined-up inventory PNGs, and
axis-oriented dimension overlay copy. Not taxonomy or Woo create.
2026-09-15 20:37:46 +00:00

4.5 KiB
Raw Blame History

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, 80% 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: all formatted inventory PNGs lined up for preview, and the Milestone 1 calibration details (widths, sqft, bdft, scale, clean calibration PNG) 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 — lined-up inventory PNGs for every batch photo, plus the dimension-overlay copy of the calibration PNG, 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 one end of the slab span, continuing while the station is not within 6 in of the other end (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.

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.
  • 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 (Milestone 3)
  • Inference / Assist (Milestone 4)
  • Changing Milestone 1 mask/axis/measure math except to reuse its outputs for batch apply and overlays