What I did
- Stage 1: blur, percentile thresholding, and contour detection locate the feature area in very large multi-page scanner TIFFs.
- Stage 2: each edge is split into sub-regions, the strongest intensity gradient in each is found, and the results are harmonized into a tight boundary.
- Stage 3: the expected staggered spot grid (scale, rotation, offset, and row/column indexing) is fit to Hough-detected circles with side-balanced scoring, so no edge gets sacrificed to fit the others.
- An operator-in-the-loop Streamlit step allows final nudges, then writes a JSON fit artifact and diagnostic overlays for the extraction stage.
Turns a slow, operator-dependent GUI task into a batchable, reproducible step with saved diagnostics.