Generate clean 2D game sprites & animation atlases — component-row pipeline: state rows, alpha cleanup, frame extraction, runtime atlases. Codex/Claude skill.
docs(video): the loop repair notes and the changelog read a walk's body as rising and falling of its own only against the bands of its upper body, each band's give to a zoom measured on the body as drawn, name the holds that keep its crossings on steps where no band would show a zoom, the upper body widens with it or no band holds still, and describe the tests of a head's top; text by the writing hand-off
Soohong Kimf01b8520ddda
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 93ac37b..f032cb8 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,9 +4,9 @@ All notable public changes to `sprite-gen` are recorded here. Versions track the## Unreleased - A walk whose feet meet once a cycle is cut one cycle long only where its body witnesses it, a walk that starts or stops in its take is named to film again, and video-set cuts a searched walk or run with motion-auto by default-**Upgrading from 3.5.0: `video-set` now cuts searched walk and run loops with `--anchor motion-auto` and their view by default, and `video-loop --anchor motion-auto` recognises crossings that mark cycles where feet hide or step apart instead of cutting two cycles.** Every walk or run item whose loop is searched is now cut with `motion-auto` and its view, producing a different cut and different bytes; `--anchor none` gives the old cut, its pictures and reports byte for byte apart from the engine hash (`producer.implementation_sha256`). Idle, attack, once-hold, lifetime, and once-return items are cut as before. In `video-loop --anchor motion-auto` without `--view`, a walk whose feet are seen together over half the interval at a pass (`crossings.HIDE_SHARE`, 0.5) and whose picture repeats each interval is now counted on cycles only where the body's top line, read less the picture's own flow, rises and falls twice an interval, and that rise and fall must be the body's own, read against its lowest row and its head's width, so the picture moved or zoomed with it witnesses nothing: where the parent engine cut two cycles, the loop is now one cycle with new bytes; where the parent engine kept the search's cut with no `steps`, the cut is the same and the strip and report now record `steps: 2`; where nothing witnesses, its crossings stay on steps with a warning (`cycle-unwitnessed`). A walk whose crossings mark steps (brief passes, or from the side) is cut to the same bytes. With `--view` (or through `video-set`), a front, back, or diagonal walk is evaluated even with brief passes: such a walk is counted on cycles with the same witness, the view's foot cue only refusing where it turns over one interval on; where nothing witnesses, its crossings stay on steps with a warning, and `video-set` leaves a `cycle-unwitnessed` loop out of the cycle alignment. Every report whose clip stands still gains `stands` and `run_limit`, and reports where cycle reading is asked gain `cycles`, with `bob` where the picture passes and `cue` only where a view is given.+**Upgrading from 3.5.0: `video-set` now cuts searched walk and run loops with `--anchor motion-auto` and their view by default, and `video-loop --anchor motion-auto` recognises crossings that mark cycles where feet hide or step apart instead of cutting two cycles.** Every walk or run item whose loop is searched is now cut with `motion-auto` and its view, producing a different cut and different bytes; `--anchor none` gives the old cut, its pictures and reports byte for byte apart from the engine hash (`producer.implementation_sha256`). Idle, attack, once-hold, lifetime, and once-return items are cut as before. In `video-loop --anchor motion-auto` without `--view`, a walk whose feet are seen together over half the interval at a pass (`crossings.HIDE_SHARE`, 0.5) and whose picture repeats each interval is now counted on cycles only where the body's top line, read less the picture's own flow, rises and falls twice an interval, and that rise and fall must be the body's own, read against its lowest row and its upper body, so the picture moved or zoomed with it witnesses nothing: where the parent engine cut two cycles, the loop is now one cycle with new bytes; where the parent engine kept the search's cut with no `steps`, the cut is the same and the strip and report now record `steps: 2`; where nothing witnesses, its crossings stay on steps with a warning (`cycle-unwitnessed`). A walk whose crossings mark steps (brief passes, or from the side) is cut to the same bytes. With `--view` (or through `video-set`), a front, back, or diagonal walk is evaluated even with brief passes: such a walk is counted on cycles with the same witness, the view's foot cue only refusing where it turns over one interval on; where nothing witnesses, its crossings stay on steps with a warning, and `video-set` leaves a `cycle-unwitnessed` loop out of the cycle alignment. Every report whose clip stands still gains `stands` and `run_limit`, and reports where cycle reading is asked gain `cycles`, with `bob` where the picture passes and `cue` only where a view is given.-- **New: crossing cycle detection (`local_cycle.read_cycles`, `local_cycle.bob_word`, `local_cycle.off_flow`, `local_cycle.twice_an_interval`, `local_cycle.own_beat`, `local_cycle.cue_word`, `crossings.HIDE_SHARE`, `crossings.Reading.hides`, `legs.body_signals`, `CYCLE_SLACK`, `CUE_FLOOR`, `CUE_SWAPPED`, `BOB_TWICE`, `BOB_FLOOR`, `BOB_ROWS`, `BOB_OWN`, `BOB_SCALE`, `BEAT_FRAMES`, `UNWITNESSED`).** In gap mode on a readable reading, when feet can hide behind one another (`reading.overlap` over `crossings.HIDE_SHARE`, 0.5) or when the view is given and is not `side`, crossing intervals are checked to see if they mark full cycles rather than single steps. `repeat_at(distances, span)` reads the mean distance of frames to those lagged by `span` over the clip's mean step from frame to frame. Comparing distances at half, one, and two intervals, crossings mark cycles when `one < half` and `one <= two + CYCLE_SLACK` (0.5), only where a witness that reads no leg says the interval holds two steps, the body's own rise and fall twice an interval: its top line (`legs.strike_signals` `top`) less its flow, read against its lowest row and head's width. New function `local_cycle.off_flow(values, interval)` returns `values` (per frame) less their flow: each frame minus the mean of the interval about it (a moving average one interval long, its two end frames weighted by the part of a frame the interval covers), kept only over the frames the interval fits about (the first and last `ceil(interval/2 - 0.5)` frames drop out), and what is left minus its least-squares straight line; a rise and fall once or twice an interval averages to nothing over one interval and is left whole, while a flow slower than the interval is taken out wholly where it bends no more than a cubic (a constant, a straight drift, an arc, a cubic) and in part where it is a slow sway a few intervals long. `local_cycle.bob_word(signals, interval)` reads the body's top line less its flow (`off_flow(top, interval)`), not the raw line; `swing` is the range of the line left over the body's median height, and `rows` is that range in pixel rows. Where the clip is under an interval long so nothing is left, `says` is null and `why` says its top line less its flow is not read; where `swing` is under `BOB_FLOOR` (0.005) or `rows` is under `BOB_ROWS` (2), `says` is null, `why` says the line's range less its flow is under 0.5 % of the body's height or 2 rows, so it does not rise and fall (the top line is read in whole pixel rows, so a picture drifting up or down makes the line step a row up and down as it rounds, and that rounding, less its own mean over an interval, stays under 2 rows), and `half` and `quarter` are not read. Otherwise it reads the line left's correlation half an interval on (`half`) and a quarter of an interval on (`quarter`), both with `crossings.correlation_on` (each the larger of the two whole lags about the span), saying `"cycles"` only where `half` is `BOB_TWICE` (0.28) or more and `quarter` is `-BOB_TWICE` (-0.28) or less (the line is as it was half an interval on and turned over a quarter on, which is a rise and fall twice an interval; a step's bob is turned over half an interval on, and any flow left over is as it was at both half and a quarter of an interval on so it cannot pass the quarter test), null otherwise with `why` giving both values. Where any frame's lowest solid row is the frame's last row (`legs.body_signals` `edge`), `says` is null, `why`: "its lowest row is the frame's last row in {n} of {N} frames: the feet may run off the frame, and the picture moving is not read off them" (there the lowest row is the frame's, not the feet's). `local_cycle.twice_an_interval(values, interval)` reads `values` (per frame) less their flow (`off_flow`), then a least-squares fit of a mean, the harmonic twice an interval (cos and sin of 4 pi k / `interval`) and the harmonic once an interval (cos and sin of 2 pi k / `interval`), k the frames left counted from the first; it returns the twice-an-interval harmonic as a complex amplitude (its cos coefficient less i times its sin coefficient), in the values' units (a line rising and falling a rows either way twice an interval reads a in magnitude; lines read so over the same frames and interval subtract as they move), or None where fewer than `BEAT_FRAMES` (8) frames are left; where none, `says` is null, `why`: "its top line's rise and fall twice an interval is not read against its lowest row and head: under 8 frames are left less the flow". `local_cycle.own_beat(signals, interval)` reads three lines with `twice_an_interval`: the top line (`top`), the lowest solid row (`reach`) and the head's width (`crown`, a log); it returns, in rows up and down (twice the magnitude): `beat` (the top line's), `lowest` (the lowest row's), `head` (the head width's, scaled by the body's median height), `less_lowest` (the top line's less the lowest row's: the picture moving taken out), `less_head` (that again with the head width's, scaled by the body's median height, added: the picture zooming taken out as well), and `own`, the smaller of `less_lowest` and `less_head` (None where a line is not read). The floor is the larger of `BOB_ROWS` and `BOB_FLOOR` of the body's median height; where `less_lowest` is under the larger of `BOB_OWN` (0.3) times `beat` and the floor, `says` is null, `why`: "its lowest row rises and falls with it: less the lowest row's, its top line's rise and fall twice an interval is {x} rows of {beat} ({percent}; at least 30% and {floor} rows): the picture moves with the body, and the body's own is not told from it"; where `less_head` is under the largest of `BOB_OWN` times `beat`, the floor, and `BOB_SCALE` (0.6) times `less_lowest`, `says` is null, `why`: "its head's width changes with it: less the head's scale too, its top line's rise and fall twice an interval is {x} rows of {beat} ({percent}), {ratio} of the {less_lowest} left against the lowest row (at least 30%, {floor} rows and 0.6): the picture zooms with the body, and the body's own is not told from it"; otherwise `says` `"cycles"`. This tells them apart because a body rising and falling on its legs leaves its planted foot, the lowest solid row, on the ground, and its head as wide as it was: the picture moved up and down carries the lowest row with the top line by the same rows, so nothing is left of the line's rise against it, while the picture zoomed in and out widens the head as it lifts the line, by as much as the body's height grows, so nothing is left once the head's scale is taken out too. New `legs.body_signals(frames)` reads per frame `crown`, the log of the mean width (in alpha) of the band from 2 % to 10 % of the clip's median body height below the first solid row (`legs.CROWN` = `(0.02, 0.10)`), and `edge`, 1 where the lowest solid row is the frame's last row, else 0; only the step count's witness reads them, merged by `loop.read_steps` into the signals it passes to `local_cycle.read_cycles`; `legs.strike_signals` is unchanged, so the loop report's `gait.silhouette.signals` is unchanged, and `--anchor none` still gives the old cut, its pictures and reports byte for byte apart from the engine hash. The directional foot cue (`legs.shade_cue` from the side or diagonal, `legs.depth_cue` from the front or back) is read with a view given by `local_cycle.cue_word(cue, interval, step=None)` and can only refuse cycles: under `CUE_FLOOR` (0.5) of the step it is drawn in (`legs.TONE`, 1/255, or a pixel row of median body height) it says `"alike"`; where it turns over one interval on (`crossings.correlation_on` at or below `CUE_SWAPPED`, `-0.2`) it says `"steps"`, refusing cycles because the other leg leads there; otherwise null. With no view no cue is read at all. Where the view's cue says `"steps"`, the count stands (two steps); else where the bob says `"cycles"`, cycles are marked; otherwise crossings stay on steps with `unwitnessed` true (`local_cycle.UNWITNESSED`) and a warning (`cycle-unwitnessed`). When cycles are marked, `Reading.mark_cycles` sets `per` to 2 and halves `step` and `step_range`: a cut one interval long is two steps, and the search's cut (`--anchor motion-auto`) taken on it writes `steps: {count: 2, by: crossings}`. A fixed cut (`--cycle fixed`, `fixed_count`) and the loop as it plays round (`ring_steps`) read the same; a fixed cut one interval long is counted two steps and not refused, and still writes no `steps`.+- **New: crossing cycle detection (`local_cycle.read_cycles`, `local_cycle.bob_word`, `local_cycle.off_flow`, `local_cycle.twice_an_interval`, `local_cycle.own_beat`, `local_cycle.cue_word`, `crossings.HIDE_SHARE`, `crossings.Reading.hides`, `legs.body_signals`, `CYCLE_SLACK`, `CUE_FLOOR`, `CUE_SWAPPED`, `BOB_TWICE`, `BOB_FLOOR`, `BOB_ROWS`, `BOB_OWN`, `BOB_SCALE`, `BEAT_FRAMES`, `UNWITNESSED`).** In gap mode on a readable reading, when feet can hide behind one another (`reading.overlap` over `crossings.HIDE_SHARE`, 0.5) or when the view is given and is not `side`, crossing intervals are checked to see if they mark full cycles rather than single steps. `repeat_at(distances, span)` reads the mean distance of frames to those lagged by `span` over the clip's mean step from frame to frame. Comparing distances at half, one, and two intervals, crossings mark cycles when `one < half` and `one <= two + CYCLE_SLACK` (0.5), only where a witness that reads no leg says the interval holds two steps, the body's own rise and fall twice an interval: its top line (`legs.strike_signals` `top`) less its flow, read against its lowest row and upper body. New function `local_cycle.off_flow(values, interval)` returns `values` (per frame) less their flow: each frame minus the mean of the interval about it (a moving average one interval long, its two end frames weighted by the part of a frame the interval covers), kept only over the frames the interval fits about (the first and last `ceil(interval/2 - 0.5)` frames drop out), and what is left minus its least-squares straight line; a rise and fall once or twice an interval averages to nothing over one interval and is left whole, while a flow slower than the interval is taken out wholly where it bends no more than a cubic (a constant, a straight drift, an arc, a cubic) and in part where it is a slow sway a few intervals long. `local_cycle.bob_word(signals, interval)` reads the body's top line less its flow (`off_flow(top, interval)`), not the raw line; `swing` is the range of the line left over the body's median height, and `rows` is that range in pixel rows. Where the clip is under an interval long so nothing is left, `says` is null and `why` says its top line less its flow is not read; where `swing` is under `BOB_FLOOR` (0.005) or `rows` is under `BOB_ROWS` (2), `says` is null, `why` says the line's range less its flow is under 0.5 % of the body's height or 2 rows, so it does not rise and fall (the top line is read in whole pixel rows, so a picture drifting up or down makes the line step a row up and down as it rounds, and that rounding, less its own mean over an interval, stays under 2 rows), and `half` and `quarter` are not read. Otherwise it reads the line left's correlation half an interval on (`half`) and a quarter of an interval on (`quarter`), both with `crossings.correlation_on` (each the larger of the two whole lags about the span), saying `"cycles"` only where `half` is `BOB_TWICE` (0.28) or more and `quarter` is `-BOB_TWICE` (-0.28) or less (the line is as it was half an interval on and turned over a quarter on, which is a rise and fall twice an interval; a step's bob is turned over half an interval on, and any flow left over is as it was at both half and a quarter of an interval on so it cannot pass the quarter test), null otherwise with `why` giving both values. Where any frame's lowest solid row is the frame's last row (`legs.body_signals` `edge`), `says` is null, `why`: "its lowest row is the frame's last row in {n} of {N} frames: the feet may run off the frame, and the picture moving is not read off them" (there the lowest row is the frame's, not the feet's). `local_cycle.twice_an_interval(values, interval)` reads `values` (per frame) less their flow (`off_flow`), then a least-squares fit of a mean, the harmonic twice an interval (cos and sin of 4 pi k / `interval`) and the harmonic once an interval (cos and sin of 2 pi k / `interval`), k the frames left counted from the first; it returns the twice-an-interval harmonic as a complex amplitude (its cos coefficient less i times its sin coefficient), in the values' units (a line rising and falling a rows either way twice an interval reads a in magnitude; lines read so over the same frames and interval subtract as they move), or None where fewer than `BEAT_FRAMES` (8) frames are left; where none, `says` is null, `why`: "its top line's rise and fall twice an interval is not read against its lowest row and upper body: under 8 frames are left less the flow". `local_cycle.own_beat(signals, interval)` reads three lines with `twice_an_interval`: the top line (`top`), the lowest solid row (`reach`) and the lowest opaque row (`sole`); it returns, in rows up and down (twice the magnitude): `beat` (the top line's), `lowest` (the lowest row's), `sole`, `less_lowest` (the top line's less the lowest row's: the picture moving taken out), `bands` (`{rows, width, zoom, beat, reads, less}`, per band: its rows below the first solid row, its width in the median frame and `zoom`, in pixels, `beat` in pixels, `reads` and `less` null where the band is not seen), `less_bands` (the least `less`, null where no band is seen), `still_bands` (the number of bands seen whose `reads` is at most 1 - `BOB_SCALE`, 0.4: they hold still on the beat), and `own`, the smaller of `less_lowest` and `less_bands` (None where a line is not read). The floor is the larger of `BOB_ROWS` and `BOB_FLOOR` of the body's median height; where `less_lowest` is under the larger of `BOB_OWN` (0.3) times `beat` and the floor, `says` is null, `why`: "its lowest row rises and falls with it: less the lowest row's, its top line's rise and fall twice an interval is {x} rows of {beat} ({percent}; at least 30% and {floor} rows): the picture moves with the body, and the body's own is not told from it"; where no band is seen (`less_bands` null), `says` is null, `why`: "no band of its upper body would show the picture zooming: zoomed in as far as its top line rises and falls twice an interval against its lowest row ({less_lowest} rows of {height}), no band's width moves 1 px (at most {largest zoom}): the picture zooming with the body is not told from the body's own"; where `less_bands` is under the largest of `BOB_OWN` times `beat`, the floor, and `BOB_SCALE` (0.6) times `less_lowest`, `says` is null, `why`: "its upper body's width changes with it: less the zoom its band {a}% to {b}% of its height below its top reads, its top line's rise and fall twice an interval is {x} rows of {beat} ({percent}), {ratio} of the {less_lowest} left against the lowest row (at least 30%, {floor} rows and 0.6): the picture zooms with the body, and the body's own is not told from it"; where no band seen holds still (`still_bands` 0), `says` is null, `why`: "no band of its upper body holds still with it: each band a zoom so far would move 1 px or more rises and falls twice an interval by more than 40% of that (the least, its band {a}% to {b}% of its height below its top, {reads}%): the picture zooming is not told from the body's own"; otherwise `says` `"cycles"`. This tells them apart because a body rising and falling on its legs leaves its planted foot, the lowest solid row, on the ground, and carries its upper body's bands whole and leaves their widths: the picture moved up and down carries the lowest row with the top line by the same rows, so nothing is left of the line's rise against it, while the picture zoomed in and out widens each band as it lifts the line, as far as the band's outline lets it, so nothing is left once the zoom is taken out too. New `legs.body_signals(frames)` reads per frame `bands`, each band's mean width in alpha, in pixels, read on the same rows in every frame, those of the clip's median body height (`legs.BANDS` = `((0.02, 0.10), (0.10, 0.18), (0.18, 0.26), (0.26, 0.34), (0.34, 0.42), (0.42, 0.50))`), and `edge`, 1 where the lowest solid row is the frame's last row, else 0; only the step count's witness reads them, merged by `loop.read_steps` into the signals it passes to `local_cycle.read_cycles`; `legs.strike_signals` is unchanged, so the loop report's `gait.silhouette.signals` is unchanged, and `--anchor none` still gives the old cut, its pictures and reports byte for byte apart from the engine hash. The directional foot cue (`legs.shade_cue` from the side or diagonal, `legs.depth_cue` from the front or back) is read with a view given by `local_cycle.cue_word(cue, interval, step=None)` and can only refuse cycles: under `CUE_FLOOR` (0.5) of the step it is drawn in (`legs.TONE`, 1/255, or a pixel row of median body height) it says `"alike"`; where it turns over one interval on (`crossings.correlation_on` at or below `CUE_SWAPPED`, `-0.2`) it says `"steps"`, refusing cycles because the other leg leads there; otherwise null. With no view no cue is read at all. Where the view's cue says `"steps"`, the count stands (two steps); else where the bob says `"cycles"`, cycles are marked; otherwise crossings stay on steps with `unwitnessed` true (`local_cycle.UNWITNESSED`) and a warning (`cycle-unwitnessed`). When cycles are marked, `Reading.mark_cycles` sets `per` to 2 and halves `step` and `step_range`: a cut one interval long is two steps, and the search's cut (`--anchor motion-auto`) taken on it writes `steps: {count: 2, by: crossings}`. A fixed cut (`--cycle fixed`, `fixed_count`) and the loop as it plays round (`ring_steps`) read the same; a fixed cut one interval long is counted two steps and not refused, and still writes no `steps`.- **Removed: the same-picture rule (`local_cycle.same_picture`, `local_cycle.same_picture_count`, `local_cycle.SAME_PICTURE_MAX`, count code `same-picture`, report fields `step_count.search.same_picture` and `step_count.same_picture`).** It kept the search's cut, with no `steps`, where the count said one step; it never cut one cycle where the search had found two. `local_cycle.read_cycles` takes its place.- **New: walk start-stop retake reporting (`loop.stand_retake`, `crossings.Reading.stands`).** In gap mode, runs where the feet stay together longer than `run_limit` (√2 times the median whole pass run) are recorded in `Reading.stands`. Where a clip shows its steps, contains `stands`, and the cut kept does not count two steps (`verdict` is not `two`) with no two-step cut closing between the standing frames, `loop.stand_retake` emits a `retake` report (`reason: "start-stop"`, `remedy: "retake"`), keeping the cut as cut without refusal under `--unfixed refuse`. Where a part also pops, one `retake` names both (`loop.retakes`): the first reason's record, `reasons: ["part-pop", "start-stop"]`, and each reason's numbers under its own key (`part_pop`, `start_stop`).- **Changed: `video-set` defaults gait anchoring to `motion-auto` (`batch.anchor_for`).** Without an explicit `--anchor`, `video-set` cuts each walk and run item whose loop is searched (`cycle_for` returns `auto` or `periodic`) with `motion-auto`, and assigns `none` to idle, attack, once-hold, lifetime, and once-return items; explicit `--anchor` options are applied to every item as before. `video-set` passes each item's view to `video-loop`. Any item whose loop names a retake carries `loop.retake`, appears in the set's `warnings`, and appends ` (film again: <reasons>)` to `table.md`.@@ -14,8 +14,8 @@ All notable public changes to `sprite-gen` are recorded here. Versions track the- **New: a walk's cut is held to its body's word before it is cut (`loop._witnessed`, `local_cycle.cut_word`, `local_cycle.unwitnessed`, `local_cycle.held_verdict`).** In `video-loop --anchor motion-auto` (`--cycle auto` or `periodic`), after `loop._by_steps` chooses the cut and before frames are cut, `loop._witnessed(cycle, frames=...)` holds the cut s/L to `local_cycle.cut_word(signals, length)`, which reads `local_cycle.bob_word` on two lines, `local_cycle.CUT_LINES` (`'screen'` on the screen, less its flow, and `'feet'` over its feet with `local_cycle.over_feet`, `feet=True`), at length L, L/2 and 2L (a picture swaying up and down once a cut or slower hides the body's rise and fall twice the cut on the screen, where the line over the feet reads it; a walk whose lean changes slowly on its feet tilts the ground under them, so the line over the feet takes in the two feet's heights by turns and reads no rise and fall, where the line on the screen reads it) and says the first either line says in `local_cycle.CUT_WORDS`: `"two steps"` (a cycle), `"four steps"` (two cycles), `"one step"` (once in the cut), or null. On two steps or four steps the cut stands (`{cut: [s, L], ...cut_word's record}`; where the cut stands and its lowest row rises and falls twice the cut more than its top line on the screen, the record carries `mark`; it holds nothing), and a cut of four steps (two cycles), its strip still counting two steps, makes `local_cycle.four_steps(cycle)` true, and `video-set` leaves the item out of cycle alignment (`left_out` `["cycle-four-steps"]`); anything else is held exactly as chosen (two clip crossing intervals where counted, else the search's cut), setting `cut_witness.held` to `"unwitnessed"`, warning `cycle-unwitnessed` (`local_cycle.held_verdict(cycle)` via `local_cycle.step_verdict`), and marking `local_cycle.unwitnessed(cycle)` true so `video-set` leaves the item out of cycle alignment (`left_out` `["cycle-unwitnessed"]`), while cuts the step count already held record `held: "step count"`. A reading of `"one step"` is held and never cut again two long because a body rising and falling once in the cut cannot be distinguished between half a cycle of legs drawn alike and a full cycle of a limp or bouncing legless body without reading legs, and the witness never lengthens or shortens a cut; walks whose body rises once a cycle, legless bodies bouncing once in the cut, and walks carried whole with no rise of their own are held and named even where a cut is a whole cycle.- **Changed: the body's own rise and fall is read against the lowest opaque row as well (`legs.body_signals` `sole`, `legs.OPAQUE`, `local_cycle.own_beat`).** `legs.body_signals(frames)` now returns `sole` per frame, taking the lowest row with an alpha of `legs.OPAQUE` (255) or the lowest solid row where none is opaque. `local_cycle.own_beat(signals, interval)` reads `sole` with `twice_an_interval` and takes `less_lowest` as the top line's rise and fall less the lowest solid row's or less the lowest opaque row's, whichever leaves less, returning `sole` as rows up and down. This prevents a translucent shadow drawn fixed on the screen under the feet from acting as the lowest solid row and registering picture shake twice an interval as the body's own rise against it, since opaque feet move with the picture.- CLI: `video-loop --view front|back|side|front_diagonal|back_diagonal` (default none) sets the clip view for cycle detection and foot cue selection.-- Report fields: `cycle.step_count.cycles` (`{asked, interval, overlap, half, one, two, slack, cue, bob, cycles, unwitnessed, why}`, where `cue` and `bob` are recorded only where the picture passes, `cue: {range, floor, swapped, one, says, why}` only with a view, `one` absent where `says` is `"alike"`, `bob: {swing, rows, floor, twice, half, quarter, edge, body: {beat, lowest, sole, head, less_lowest, less_head, own, share, scale, least, scale_least}, says, why}`, `half`, `quarter`, `edge` and `body` absent under the floors, `body` absent where under 8 frames are left, and `why` absent where it says `"cycles"`, and `unwitnessed` true only where nothing witnessed); the loop's warnings (`jolt.warnings`); `step_count.stands` and `step_count.run_limit`; `loop.retake` (`{reason: "start-stop", reasons, start_stop: {stands, run_limit, crossings, cut, verdict, code, why}, remedy: "retake"}`); the set report's item `loop.retake` (`{reason, reasons, remedy}`) and item `loop["cycle-unwitnessed"]` (`true`), and its state's `cycle_align.<state>.left_out` (`{item: reasons}`); the loop report's `cycle.cut_witness` (`{cut, says, by, lines, on, why, held, mark}`, `lines` (`{screen, feet}`, each `{says, bob, on, why}`), the feet line's `bob` and `on` with `over`, `by` only where it says a word, `on` with its `line` and `interval` only for four steps or one step, `why` only where `says` is null, `held` only where held, and `mark` only where marked); the printed summary's `cycle.cut_witness` (`{cut, says, by, held, mark}`, each where present).-- Python callers: new `local_cycle.read_cycles(reading, distances, view=None, cue=None, cue_step=None, signals=None)`, `local_cycle.bob_word(signals, interval, feet=False)`, `local_cycle.twice_an_interval(values, interval)`, `local_cycle.own_beat(signals, interval)`, `local_cycle.cut_word(signals, length)`, `local_cycle.over_feet(signals, interval)`, `local_cycle.unwitnessed(cycle)`, `local_cycle.four_steps(cycle)`, `local_cycle.held_verdict(cycle)` (refuses with a `ValueError` a cut held on one step whose record names no line it was read on (no `by` or `lines`)), `legs.OPAQUE`, `local_cycle.BOB_OWN`, `local_cycle.BOB_SCALE`, `local_cycle.BEAT_FRAMES`, `legs.body_signals(frames)`, `legs.CROWN`, `local_cycle.off_flow(values, interval)`, `local_cycle.cue_word(cue, interval, step=None)`, `local_cycle.BOB_TWICE`, `local_cycle.BOB_FLOOR`, `local_cycle.BOB_ROWS`, `local_cycle.CUT_LINES`, `local_cycle.CUT_WORDS`, `local_cycle.UNWITNESSED`, `local_cycle.FOUR_STEPS`, `local_cycle.CUE_FLOOR`, `legs.TONE`, `local_cycle.repeat_at(distances, span)`, `batch.anchor_for(state, cut, anchor)`, `batch.left_out_why(reasons, stands=False, one_step=False)`, `loop.stand_retake(cycle)`, `loop.retakes(*records)`, `loop.STAND_REASON`; `crossings._alternation` is now public `crossings.correlation_on(values, span)`; `align._feet`, `align._depth_cue`, `align._shade_cue`, and `align.SHADE_BAND` are moved to `legs.feet_halves`, `legs.depth_cue`, `legs.shade_cue`, and `legs.SHADE_BAND` (`align` keeps `_depth_cue` and `_shade_cue` aliases); `crossings.Reading` gains `interval`, `per`, `cycles`, `hides`, and `mark_cycles(said)`.+- Report fields: `cycle.step_count.cycles` (`{asked, interval, overlap, half, one, two, slack, cue, bob, cycles, unwitnessed, why}`, where `cue` and `bob` are recorded only where the picture passes, `cue: {range, floor, swapped, one, says, why}` only with a view, `one` absent where `says` is `"alike"`, `bob: {swing, rows, floor, twice, half, quarter, edge, body: {beat, lowest, sole, less_lowest, less_bands, still_bands, own, bands: {rows, width, zoom, beat, reads, less}, share, scale, least, scale_least, band_floor}, says, why}`, `half`, `quarter`, `edge` and `body` absent under the floors, `body` absent where under 8 frames are left, and `why` absent where it says `"cycles"`, and `unwitnessed` true only where nothing witnessed); the loop's warnings (`jolt.warnings`); `step_count.stands` and `step_count.run_limit`; `loop.retake` (`{reason: "start-stop", reasons, start_stop: {stands, run_limit, crossings, cut, verdict, code, why}, remedy: "retake"}`); the set report's item `loop.retake` (`{reason, reasons, remedy}`) and item `loop["cycle-unwitnessed"]` (`true`), and its state's `cycle_align.<state>.left_out` (`{item: reasons}`); the loop report's `cycle.cut_witness` (`{cut, says, by, lines, on, why, held, mark}`, `lines` (`{screen, feet}`, each `{says, bob, on, why}`), the feet line's `bob` and `on` with `over`, `by` only where it says a word, `on` with its `line` and `interval` only for four steps or one step, `why` only where `says` is null, `held` only where held, and `mark` only where marked); the printed summary's `cycle.cut_witness` (`{cut, says, by, held, mark}`, each where present).+- Python callers: new `local_cycle.read_cycles(reading, distances, view=None, cue=None, cue_step=None, signals=None)`, `local_cycle.bob_word(signals, interval, feet=False)`, `local_cycle.twice_an_interval(values, interval)`, `local_cycle.own_beat(signals, interval)`, `local_cycle.cut_word(signals, length)`, `local_cycle.over_feet(signals, interval)`, `local_cycle.unwitnessed(cycle)`, `local_cycle.four_steps(cycle)`, `local_cycle.held_verdict(cycle)` (refuses with a `ValueError` a cut held on one step whose record names no line it was read on (no `by` or `lines`)), `legs.OPAQUE`, `local_cycle.BOB_OWN`, `local_cycle.BOB_SCALE`, `local_cycle.BEAT_FRAMES`, `legs.body_signals(frames)`, `legs.BANDS`, `legs.band_rows(median)`, `legs.band_widths(alpha, rows)`, `legs.zoomed(alpha, scale)`, `local_cycle.BAND_FLOOR`, `local_cycle.off_flow(values, interval)`, `local_cycle.cue_word(cue, interval, step=None)`, `local_cycle.BOB_TWICE`, `local_cycle.BOB_FLOOR`, `local_cycle.BOB_ROWS`, `local_cycle.CUT_LINES`, `local_cycle.CUT_WORDS`, `local_cycle.UNWITNESSED`, `local_cycle.FOUR_STEPS`, `local_cycle.CUE_FLOOR`, `legs.TONE`, `local_cycle.repeat_at(distances, span)`, `batch.anchor_for(state, cut, anchor)`, `batch.left_out_why(reasons, stands=False, one_step=False)`, `loop.stand_retake(cycle)`, `loop.retakes(*records)`, `loop.STAND_REASON`; `crossings._alternation` is now public `crossings.correlation_on(values, span)`; `align._feet`, `align._depth_cue`, `align._shade_cue`, and `align.SHADE_BAND` are moved to `legs.feet_halves`, `legs.depth_cue`, `legs.shade_cue`, and `legs.SHADE_BAND` (`align` keeps `_depth_cue` and `_shade_cue` aliases); `crossings.Reading` gains `interval`, `per`, `cycles`, `hides`, and `mark_cycles(said)`.- **Tests**: `tests/video/test_walk_steps.py` covers these synthetic walker cases (the walkers' bodies rise and fall on legs whose soles stay on the ground unless held still or drawn carried whole):- a walker seen from behind whose far foot hides behind the near one (feet together over half the interval) across cycles of 20 frames on twos, 24 on threes, and 17.5 and 18.5 on ones: its top line rises and falls twice an interval, cutting one cycle within a frame with `cycles` true, `steps: 2`, and no cue read with no view, its bob's `body.share` at least `0.3`, `body.scale` at least `0.6`, `edge` 0, and its `why` naming the body's own; the same walker with its far leg drawn as the near one (legs alike), with no view and with `--view back_diagonal`, is still cut to one cycle because the view's cue says `"alike"` (which no longer refuses) and the bob witnesses;- a front-diagonal walker whose near foot steps out toward the camera and passes the far one apart (feet together under half the interval, cycle 16 and 18): with `--view front_diagonal` cut to one cycle because its foot cue moves over the floor and does not turn over one interval on (`says` null) and its top line rises and falls twice an interval; without a view it is not asked and is cut to two cycles (32, 36 frames); its cut witness says `"four steps"`, its strip says `steps: 2`, and `local_cycle.four_steps` is true;@@ -35,9 +35,11 @@ All notable public changes to `sprite-gen` are recorded here. Versions track the- the walker seen from behind (17.5, rising and falling twice an interval on its legs), its frames cut at the soles' row so the lowest row is each frame's last: two intervals, `unwitnessed`, the warning, `edge` over 0 and a `why` naming the frame's last row;- `twice_an_interval` over intervals of 15 and 17.5 frames: a line rising and falling 3 rows either way twice an interval, with a rise and fall of 2 rows once an interval and a cubic flow 48 rows either way laid on it, reads 3 rows (within 0.15); the same rise and fall on a constant reads within 0.15 of it; 14 frames over an interval of 15 read None;- `bob_word` over an interval of 15 frames, the body 100 rows tall, its lines in whole rows: a top line rising and falling 3 rows either way twice an interval with the lowest row still says `"cycles"` (`share` over 0.9, `scale` 1); the same rise and fall with the lowest row rising and falling with it (the body carried up and down whole, or held still on a picture shaken twice an interval: the same lines) says null, its `why` naming the lowest row; a rise and fall of 3 rows of its own on a picture shaken 12 rows with it (its own a fifth of the line's, under `BOB_OWN`) says null;- - `bob_word`: the body zoomed in and out twice an interval with the picture about its feet (3 % either way: the top line 3 rows, the lowest row still) or about its middle (6 %: the top line and the lowest row 3 rows either way, turned over from each other), its head's width and height scaled with it: null, `scale` under `0.6`, its `why` naming the head's width;+ - `bob_word`: the body zoomed in and out twice an interval with the picture about its feet (3 % either way: the top line 3 rows, the lowest row still) or about its middle (6 %: the top line and the lowest row 3 rows either way, turned over from each other), its upper body's width and height scaled with it: null, `scale` under `0.6`, its `why` naming the upper body's width;- `bob_word`: the planted rise and fall says `"cycles"`; the same with the lowest row on the frame's last row in one frame of 73 says null, `edge` 1, `why` "in 1 of 73 frames";- read off drawn frames with `legs.strike_signals` and `legs.body_signals`: five walkers that do not rise and fall twice an interval on their legs (the wide legs-alike side walker, interval 23, held still, carried whole bobbing once a step, or rising and falling on its legs once a step; the walker seen from behind, legs alike, interval 17.5, held still or carried whole rising and falling twice an interval), each moved up and down with the whole picture 3, 6 or 12 px either way every d/4, d/2, d or 2d frames (d its interval) at four phases: none is witnessed. Three of them (the side walker held still and on its legs, the walker from behind held still) zoomed in and out 0.5, 1, 2 or 4 % either way every d/4, d/2 or d frames about the feet, the middle or the head, at two phases: none is witnessed;+ - the wide walker, its head's top flat, round, pointed or two ears' tips, held still or rising and falling on its legs once a step, zoomed in and out 4 % either way with the picture about its feet, middle or head every quarter, half or whole cycle (11.5, 23 or 46 frames): never two steps an interval of a step (23 frames), nor a cut of a step said to be a cycle or two, nor a cut of two cycles (92) said to be one; cut through the loop, the walker with a pointed head or ears zoomed every quarter cycle (11.5 frames), and the walker with a pointed head held still zoomed about its feet twice a step, are never cut half a cycle unnamed;+ - a top line rising and falling twice an interval on legs whose feet stay on the ground witnesses two steps an interval on a body whose sides run straight down; on a cone from a point at its top (where a zoom would move no band a pixel) or where no band of its upper body holds still on the beat, it is held by default, the word saying why;- the side walker rising and falling on its legs once a step (its crossings its steps), running: both soles lifted up to 1, 2, 3 or 6 px off the ground while the body is high; still or on a picture moved 6 px either way every d/2 (two phases) or every d frames: never witnessed;- the side walker drawn as a view from behind or a diagonal draws feet, each sole up to 6, 12 or 24 px lower the further back its foot is, the foot moving forward lifted 8 px (the lowest row is the planted foot, sliding down the screen through its step); still, or on a picture moved 3, 6 (four phases) or 12 px either way every d/2 frames, or 6 px every d: never witnessed;- synthetic start-stop clips with feet together for 15 frames at the head and 14 at the tail alongside passes of 8 and 3 frames flag retakes when the cut is uncertain, omit retakes when counted as two steps, and report no `stands` when feet only pass.@@ -50,7 +52,7 @@ All notable public changes to `sprite-gen` are recorded here. Versions track the- the same walker on a picture moved 12 px up and down every two thirds of a step has the search cut 16 frames or under, held and named.- the same walker held still on its legs over a shadow fixed on the screen touching its soles on a picture shaken 6 px twice a step reads no feet, cuts 23 frames; on the screen its top line rises and falls twice the cut with the picture (`half` at least `BOB_TWICE`, `quarter` at most `-BOB_TWICE`), and its lowest opaque row (the feet's) with it, more than the lowest solid row (the shadow), its why saying its lowest row rises and falls with it; over the lowest opaque row (`over` `sole`) its top line holds still (under `BOB_ROWS` rows: "does not rise and fall"); neither line witnesses the cut, and it is held and named (read over the lowest solid row alone, the shadow holding still, the picture's shaking would witness `"two steps"`).- a walk rising and falling on its legs once a step, its feet on the ground, on a picture swaying up and down once a cycle or slower (the wide walker with its legs drawn alike, crossings every 23 frames, a cycle of 46 frames, the picture swaying 12 px either way every 46 frames or 24 px every 69 frames; and the walker whose far foot passes hidden, 20 frames a cycle on twos, the picture swaying 24 px every 40 frames) is cut one cycle, its cut witnessed `"two steps"` by the line over its feet (`by` includes `feet`), read over `reach` or `sole`, not held, no warning (read on the screen alone, the sway hides the body's rise and fall twice the cut, and the cycle would be held).- - the walker whose far foot passes hidden behind the near one, its legs drawn alike, its feet meeting once a cycle (17.5 frames), rising and falling on its legs once a step, turned 15 degrees about its feet over the clip (k/72 of it in frame k, on a canvas 60 px taller above and below: a lean changing slowly on its feet), cuts one cycle (within 1 frame of 17.5); the line over its feet says null: it does not rise and fall twice an interval (the lean tilts the ground under the feet, and the line over them takes in the two feet's heights by turns); on the screen the top line, less its flow, rises and falls of its own twice the cut: `"two steps"` by `screen` (`by` is `["screen"]`), not held, no warning, `local_cycle.unwitnessed` false.+ - the walker whose far foot passes hidden behind the near one, its legs drawn alike, its feet meeting once a cycle (17.5 frames), rising and falling on its legs once a step, turned 15 degrees about its feet over the clip (k/72 of it in frame k, on a canvas 60 px taller above and below: a lean changing slowly on its feet), cuts one cycle (within 1 frame of 17.5); the line over its feet says null: it does not rise and fall twice an interval (the lean tilts the ground under the feet, and the line over them takes in the two feet's heights by turns); on the screen the top line, less its flow, rises and falls twice the cut, but by under 5 rows of the body's 127: a zoom lifting it as far would widen the head under a pixel (`BAND_FLOOR`), as the pixel grid alone may, and the head's bands, still on the beat, are not seen; the bands below swing with the arms on the beat. No band that would show the zoom holds still, the body's own is not told from the picture zooming, and the cut is held as chosen, a cycle long, and named.- a side walker whose legs four tones apart tell its steps apart on a 30-frame cycle, filmed 100 frames, with its body sinking 3 px once a cycle and not at each step (a limp) is cut 30 frames by the search, two steps by the crossings, returning "one step", held and named, and is never cut 60 frames long.- the legless body bouncing every 16 frames leaves the search's cut standing as cut, never cut again two long, and is held and named where the body rises and falls once in it.- **Tests**: `tests/video/test_gait_guard_anchor_wide.py` and `tests/video/test_cycle_align.py` cover batch anchoring and cycle alignment:diff --git a/docs/loop-repair.md b/docs/loop-repair.mdindex 8a96e69..a881bb8 100644--- a/docs/loop-repair.md+++ b/docs/loop-repair.md@@ -1353,39 +1353,59 @@ frames left counted from the first; it returns the twice-an-interval harmonic asa rows either way twice an interval reads a in magnitude. Lines read so over the same frames andinterval subtract as they move. None where fewer than `BEAT_FRAMES` (`8`) frames are left. Where none:`says` null, `why`: "its top line's rise and fall twice an interval is not read against its lowest row-and head: under 8 frames are left less the flow". `local_cycle.own_beat(signals, interval)` reads four-lines with `twice_an_interval`: the top line (`top`), the lowest solid row (`reach`), the lowest opaque-row (`sole`) and the head's width (`crown`, a log). It returns, in rows up and down (twice the-magnitude): `beat` (the top line's), `lowest` (the lowest row's), `sole` (the lowest opaque row's),-`head` (the head width's, scaled by the body's median height), `less_lowest` (the top line's less the-lowest solid row's or less the lowest opaque row's, whichever leaves less: the picture moving taken out),-`less_head` (that again with the head width's, scaled by the body's median height, added: the picture-zooming taken out as well), and `own`, the smaller of `less_lowest` and `less_head`. None where a line-is not read. The floor is the-larger of `BOB_ROWS` and `BOB_FLOOR` of the body's median height. Where `less_lowest` is under the larger-of `BOB_OWN` (`0.3`) times `beat` and the floor: `says` null, `why`: "its lowest row rises and falls with-it: less the lowest row's, its top line's rise and fall twice an interval is {x} rows of {beat} ({percent};-at least 30% and {floor} rows): the picture moves with the body, and the body's own is not told from it".-Where `less_head` is under the largest of `BOB_OWN` times `beat`, the floor, and `BOB_SCALE` (`0.6`)-times `less_lowest`: `says` null, `why`: "its head's width changes with it: less the head's scale too, its-top line's rise and fall twice an interval is {x} rows of {beat} ({percent}), {ratio} of the {less_lowest}-left against the lowest row (at least 30%, {floor} rows and 0.6): the picture zooms with the body, and-the body's own is not told from it". Otherwise `says` `"cycles"`. A body rising and falling on its legs-leaves its planted foot, the lowest solid row, on the ground, and its head as wide as it was. The-picture moved up and down carries the lowest row with the top line by the same rows, so nothing is left-of the line's rise against it. The picture zoomed in and out widens the head as it lifts the line, by as-much as the body's height grows, so nothing is left once the head's scale is taken out too.-`legs.body_signals(frames)`: per frame `crown`, the log of the mean width (in alpha) of the band from-2 % to 10 % of the clip's median body height below the first solid row (`legs.CROWN` = `(0.02, 0.10)`),-`edge`, 1 where the lowest solid row is the frame's last row, else 0, and `sole`, the lowest row with a-fully opaque pixel (alpha `legs.OPAQUE` = 255), or the lowest solid row where a frame has none, because a-shadow drawn translucent under the feet is solid to the legs' reading (alpha 128 or more) and, drawn fixed-on the screen, stays while the picture moves, so a picture shaken twice an interval would otherwise be read-as the body's own rise against it; the feet are drawn opaque and move with the picture. `signals` are the frames'-`legs.strike_signals` merged with `legs.body_signals`; the body's median height is the median of-`signals["height"]`. Only the step count's witness reads them: `loop.read_steps` merges them into the-signals it passes to `local_cycle.read_cycles`. `legs.strike_signals` is unchanged, so the loop report's-`gait.silhouette.signals` is unchanged. The+and upper body: under 8 frames are left less the flow". `local_cycle.own_beat(signals, interval)` reads+the top line (`top`), the lowest solid row (`reach`) and the lowest opaque row (`sole`) with+`twice_an_interval`. What is left of the top line's rise and fall against the lowest row (`less_lowest`,+the top line's less the lowest solid row's or less the lowest opaque row's, whichever leaves less) gives+the zoom that would make it: the median frame zoomed in by 1 + `less_lowest` / the body's median height+(`legs.zoomed`). Each band's `zoom` is how far that moves the band's width, in pixels, measured on the+body as it is drawn, not assumed of its outline: a band whose sides run straight down moves by the zoom's+whole part, a band across a top that widens as it goes down (a pointed head, an ear's tip, a hat's point)+by less, a band under a point by none. A band is seen where its `zoom` is `BAND_FLOOR` or more. Each+band's `beat` is its width's rise and fall twice an interval (`twice_an_interval`), in pixels up and+down. For a band seen: `reads` = its `beat` / its `zoom` (the share of the zoom making the line's rise and+fall that the band reads), and `less` = what is left of the top line's rise and fall twice an interval+less that zoom (the band's width change read as a zoom and taken out, in rows up and down). It returns+`beat`, `lowest`, `sole`, `less_lowest`, `bands` (`{rows, width, zoom, beat, reads, less}`, per band: its+rows below the first solid row, its width in the median frame and `zoom`, in pixels, `beat` in pixels,+`reads` and `less` null where the band is not seen), `less_bands` (the least `less`, null where no band is+seen), `still_bands` (the number of bands seen whose `reads` is at most 1 - `BOB_SCALE`, 0.4: they hold+still on the beat), and `own`, the smaller of `less_lowest` and `less_bands`. None where a line is not+read. The floor is the larger of `BOB_ROWS` and `BOB_FLOOR` of the body's median height. Where+`less_lowest` is under the larger of `BOB_OWN` (`0.3`) times `beat` and the floor: `says` null, `why`:+"its lowest row rises and falls with it: less the lowest row's, its top line's rise and fall twice an+interval is {x} rows of {beat} ({percent}; at least 30% and {floor} rows): the picture moves with the+body, and the body's own is not told from it". Where no band is seen (`less_bands` null): `says` null,+`why`: "no band of its upper body would show the picture zooming: zoomed in as far as its top line rises+and falls twice an interval against its lowest row ({less_lowest} rows of {height}), no band's width+moves 1 px (at most {largest zoom}): the picture zooming with the body is not told from the body's own".+Where `less_bands` is under the largest of `BOB_OWN` (0.3) times `beat`, the floor, and `BOB_SCALE` (0.6)+times `less_lowest`: `says` null, `why`: "its upper body's width changes with it: less the zoom its band+{a}% to {b}% of its height below its top reads, its top line's rise and fall twice an interval is {x}+rows of {beat} ({percent}), {ratio} of the {less_lowest} left against the lowest row (at least 30%,+{floor} rows and 0.6): the picture zooms with the body, and the body's own is not told from it". Where+no band seen holds still (`still_bands` 0): `says` null, `why`: "no band of its upper body holds still with+it: each band a zoom so far would move 1 px or more rises and falls twice an interval by more than 40%+of that (the least, its band {a}% to {b}% of its height below its top, {reads}%): the picture zooming is+not told from the body's own". Otherwise `says` `"cycles"`. A body rising and falling on its legs leaves+its planted foot, the lowest solid row, on the ground, and carries its upper body's bands whole, leaving+their widths. The picture moved up and down carries the lowest row with the top line by the same rows, so+nothing is left of the line's rise against it. The picture zoomed in and out widens each band as it+lifts the line, as far as the band's outline lets it. Where no band would show the zoom, or none that+would holds still (a band the arms swing across on the beat moves as much as a zoom might), nothing tells+the picture zooming from the body's own, and nothing is witnessed. A body rising and falling so little+that no band would move a pixel is not told from a zoom either.+`legs.body_signals(frames)`: `bands` (per frame, each band's mean width in alpha, in pixels, read on the same+rows in every frame, those of the clip's median body height), `band_rows`, `median_frame` (the alpha of the+frame whose body height is nearest the clip's median), `edge`, 1 where the lowest solid row is the frame's+last row, else 0, and `sole`, the lowest row with a fully opaque pixel (alpha `legs.OPAQUE` = 255), or the+lowest solid row where a frame has none, because a shadow drawn translucent under the feet is solid to the+legs' reading (alpha 128 or more) and, drawn fixed on the screen, stays while the picture moves, so a+picture shaken twice an interval would otherwise be read as the body's own rise against it; the feet are+drawn opaque and move with the picture. `signals` are the frames' `legs.strike_signals` merged with+`legs.body_signals`; the body's median height is the median of `signals["height"]`. Only the step count's+witness reads them: `loop.read_steps` merges them into the signals it passes to `local_cycle.read_cycles`.+`legs.strike_signals` is unchanged, so the loop report's `gait.silhouette.signals` is unchanged. Theview's foot cue can only refuse cycles (`local_cycle.cue_word(cue, interval, step=None)`):`legs.shade_cue` from the side or a diagonal, `legs.depth_cue` from the front or back, per frame. A cuewhose range over the clip is under `CUE_FLOOR` (0.5) of the step it is drawn in (`legs.TONE` of luma, or@@ -1400,7 +1420,7 @@ first: where it says `"steps"`, `cycles` is false, the count stands (two steps),foot cue turns over there: the other leg leads, a step, and no warning is given. Else where the bob says`"cycles"`, `cycles` is true, and `why` says the body's top line less its flow rises and falls twice aninterval (its `half`, at least `BOB_TWICE`; its `quarter`, at most `-BOB_TWICE`), the body's own ({own}-rows of {beat} left against its lowest row and head, {share}; at least 30%): two steps an interval, the+rows of {beat} left against its lowest row and upper body, {share}; at least 30%): two steps an interval, thefeet meet once a cycle. Else `cycles` is false and `unwitnessed` is true: the crossings stay onsteps, as from the side; `why` says nothing that reads no leg witnesses two steps an interval (the bob'sown `why` in parentheses, or "no top line read"): a step on draws as a cycle on, as from the side, and@@ -1417,9 +1437,10 @@ written). Recorded in `cycle.step_count.cycles`:`cue: {range, floor, swapped, one, says, why}` (only with a view; `one` absent where `says` is `"alike"`;`says` is `"steps"`, `"alike"` or null); `bob: {swing, rows, floor, twice, half, quarter, edge, body, says, why}`(`half`, `quarter`, `edge` (frames whose lowest row is their last) and `body` are absent under the floors;-`body` is also absent where under 8 frames are left; `body` is `{beat, lowest, head, less_lowest, less_head, own,-share, scale, least, scale_least}`: the six rows values rounded to 0.01, `share` = `own` / `beat`,-`scale` = `less_head` / `less_lowest`, `least` = `BOB_OWN`, `scale_least` = `BOB_SCALE`; `why` absent+`body` is also absent where under 8 frames are left; `body` is `{beat, lowest, sole, less_lowest, less_bands,+still_bands, own, bands: {rows, width, zoom, beat, reads, less}, share, scale, least, scale_least,+band_floor}`: `share` = `own` / `beat`, `scale` = `less_bands` / `less_lowest` (null where no band is seen),+`least` = `BOB_OWN`, `scale_least` = `BOB_SCALE`, `band_floor` = `BAND_FLOOR`; values rounded to 0.01; `why` absentwhere it says `"cycles"`; `says` is `"cycles"` or null); `unwitnessed` true only where nothing witnessed; absent where not asked. `cue` and`bob` are recorded only where the picture passes. The same reading is used for the search's cut(`--anchor motion-auto`), a fixed cut@@ -1491,7 +1512,11 @@ behind, legs alike, interval 17.5, held still or carried whole rising and fallinmoved up and down with the whole picture 3, 6 or 12 px either way every d/4, d/2, d or 2d frames (d itsinterval) at four phases: none is witnessed. Three of them (the side walker held still and on its legs, thewalker from behind held still) zoomed in and out 0.5, 1, 2 or 4 % either way every d/4, d/2 or d frames about-the feet, the middle or the head, at two phases: none is witnessed. The side walker rising and falling on+the feet, the middle or the head, at two phases: none is witnessed. The walker with its head drawn flat,+round, pointed or with ears (held still or rising and falling on its legs once a step), zoomed in and out+4 % either way with the picture about its feet, middle or head every quarter, half or whole cycle (11.5,+23 or 46 frames): none is witnessed two steps an interval of a step (23 frames), nor a cut of a step said to+be a cycle or two, nor a cut of two cycles (92) said to be one. The side walker rising and falling onits legs once a step (its crossings its steps), running: both soles lifted up to 1, 2, 3 or 6 px off theground while the body is high; still or on a picture moved 6 px either way every d/2 (two phases) or every dframes: never witnessed. The side walker drawn as a view from behind or a diagonal draws feet, each sole up@@ -1626,7 +1651,7 @@ step's beat read as steps; a narrow step that opens the feet only just past theat that threshold. Where a pass is hidden behind the other foot, or where the view is given and is not`side`, the cycles reading (`local_cycle.read_cycles`) sees whether the crossings mark cycles: where theclip repeats one interval on as near as two on, the crossings mark cycles only where the body's top line-rises and falls twice an interval of the body's own (against its lowest row and head's width) unless the+rises and falls twice an interval of the body's own (against its lowest row and upper body) unless theview's foot cue says `"steps"`; where they mark cycles, the reading cuts one cycle as two steps. What itstill cannot tell: a side walk with brief passes whose two steps are one silhouette is not asked, becausefrom the side the legs a step on are one silhouette, as near as a cycle on, and the picture cannot tell; a@@ -1634,13 +1659,18 @@ clip with no view and brief passes is not asked, so a front diagonal whose nearcut two cycles, so give `--view`; a walk whose feet do meet once a cycle but whose body's top line does notrise and fall twice an interval of the body's own (a body held still, a figure carried up and down whole, apicture moved with the body so that less than `BOB_OWN` of the rise is left against its lowest row, or zoomed-with it so that the head's scale takes what is left down too far, a run whose feet leave the ground so far-with the body that too little of the rise is its own, feet at the frame's last row, or a top line that a-part held over the head moves on a beat of its own) has its crossings left on steps: cut two cycles long,-with the warning, and `video-set` leaves it out of the cycle alignment (`video-cycle-align` run on its own-reads such a loop's `steps: 2` as one cycle; through `video-set` it is left out); and a walk whose crossings-are its steps, whose legs are drawn alike so its picture repeats a step on, and whose top line rises and-falls twice a step (a part over the head on a beat twice the step's) would still be read as cycles.+with it so that taking out, band by band, the zoom each band's width reads, less that zoom too little of+the rise is left (`less_bands` under the largest of `BOB_OWN` times `beat`, the floor, and `BOB_SCALE` times+`less_lowest`), a walk with no band of the upper body that a zoom as far as the rise would move a pixel+or more (`BAND_FLOOR`), as for a body rising and falling so little, or one narrowing from a point+at its top all the way down (a cone), a walk with no such band holding still on the beat, as where the arms+swing across every band a zoom would move, a run whose feet leave the ground so far with the body that too+little of the rise is its own, feet at the frame's last row, or a top line that a part held over the head+moves on a beat of its own) has its crossings left on steps: cut two cycles long, with the warning, and+`video-set` leaves it out of the cycle alignment (`video-cycle-align` run on its own reads such a loop's+`steps: 2` as one cycle; through `video-set` it is left out); and a walk whose crossings are its steps,+whose legs are drawn alike so its picture repeats a step on, and whose top line rises and falls twice a+step (a part over the head on a beat twice the step's) would still be read as cycles.A walk whose body rises and falls once a cycle (a limp) and a legless body bouncing once in its cut are heldand named even where the cut is a whole cycle, and a walk carried up and down whole, feet and all, with norise of its own, is held. The witness never lengthens or shortens a cut.