The lattice minimum counted marked tiles over the whole frame, so a corner
diagonal of one or two tiles covered fully at a large period and won: a
grey 256x256 frame with 15 random dark pixels read as LATTICE 20 times out
of 20. A class now counts only with 8 marked tiles on 3 diagonals that are
each half marked or more, and with marks off it under a quarter of its
cover. BLOCKS needs 3 edge lines on each axis (one sharp rectangle has two)
and a share of half or less (a checkerboard has no picture around it); the
docstring and docs/agent_collaboration.md say what it still misreads:
several sharp rectangles, and blocks off the frame's origin.
Tests: sparse random dark pixels at 256x256, 320x180, 640x360 and
1280x720, Gaussian noise, marks along rows, a lattice through noise, a
checkerboard and one rectangle (24 tests, 58 failures before the fix).
AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From a PNG or PPM frame on the user's disk, numbers only: luma statistics,
the dark share of a 4x4 grid of regions, a lattice detector (tile, period,
phase, diagonal, corner), a block-grid detector (block size and share of
blocks cut off), a per-8x8 diff against a second frame and a defect class.
LATTICE, BLACK-NEAR, BLOCKS, FLASH and OK are measured; CHAR-BLACK,
CHAR-MISSING, 2D-MISSING, STRAY-GEO and SMEAR need scene knowledge and are
only given by a human (--class, with --region for numbers). Standard
library: PNG read with zlib and struct (8-bit grey/RGB/RGBA, not
interlaced, five filters), binary PPM/PGM; the rest is refused. No pixels
or paths in the output; no file written.
docs/agent_collaboration.md gets the PICTURE block next to RUN, with an
example from a synthetic frame; the docs index line names it.
Tests: tests/test_picture_metrics.py draws synthetic frames and checks the
drawn parameters come back (20 tests).
AI-assisted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>