# stereo-spots — Stereo Spot Reconstruction Demo Generate a synthetic stereo scene with a small set of stereo spots, detect the spots in both camera views, match them with a near-plane stereo heuristic, and report the reconstructed 3D points in the first camera frame. This utility is intended for development and verification of the `s6.vision.stereo_spots` pipeline. By default it uses the repository's `configs/calib_031916.sense-core.json` calibration and the `LR`/`LL` camera pair. ## Usage ```bash # Run the default interactive demo conda run -n torch s6 utils stereo_spots # Run headless and save the generated inputs and overlays conda run -n torch s6 utils stereo_spots --no-show --save-dir ./temp/stereo-spots ``` ## What It Does - Synthesizes `3 <= n < 10` bright 3D points near a plane, with small normal jitter so they are not exactly coplanar. - Projects and renders those points into both camera images with OpenCV. - Runs `s6.vision.reconstruct_stereo_spots(...)` on the rendered stereo pair. - Prints per-point and aggregate 3D reconstruction error in the first camera frame. - Optionally shows or saves overlay images with ground-truth marks, detected spots, and matched IDs. ## Key Options - `--calibration`: calibration JSON to load. - `--camera0`: first camera key; output 3D points are reported in this frame. - `--camera1`: second camera key. - `--num-points`: number of synthetic stereo spots to generate. - `--seed`: deterministic random seed for the synthetic scene. - `--spot-radius-px`: rendered spot radius in pixels. - `--show` / `--no-show`: enable or disable the OpenCV preview window. - `--save-dir`: optional directory for saved input and overlay PNGs.