← back to roto on ba3a.dev

Package-level declarations

Types

Link copied to clipboard

Where in its repeat a figure's feet strike the ground: the contact pose, legs spread widest. The spread is measured in the bottom band of each mask — its horizontal extent there — and averaged over every frame at the same phase of the repeat, so one noisy frame cannot move the contact.

Link copied to clipboard

The cycle stage: a clip's CycleAnalysis by the CycleDetector, cached under the masks, the root track, the frame rate, the CycleSettings and whether the clip loops. Only a proposal: the artist's own markers, once set, take its place and are not touched by it.

Link copied to clipboard
@Serializable
data class CycleAnalysis(val repeatFrames: Int?, val repeatScore: Double?, val contacts: List<Int>, val markers: List<Int>)

What the cycle stage found in a clip: the silhouette repeating every repeatFrames frames with a mean mask overlap of repeatScore (both null when the clip does not loop or is too short to repeat), the contacts where the feet strike, and the proposed key-frame markers as KeyFrames boundaries.

Link copied to clipboard

Finds a clip's cycle and proposes its key frames:

Link copied to clipboard
@Serializable
data class CycleSettings(val minPeriodMs: Int = 300, val maxPeriodMs: Int = 2500, val repeatsPerCycle: Int = 1, val contactBand: Double = 0.15, val keyFrames: Int = 8)

How a clip's cycle is found and its key frames proposed; stored per clip in profile.json.

Link copied to clipboard
class KeyFrames(val boundaries: List<Int>)

A clip's key frames as boundaries: frame indices in rising order, each but the last a key frame that lasts until the next. For a looping clip the last boundary is where the cycle starts over — the frame showing the first key frame's pose again, not drawn itself — so moving it changes the length of the loop. Marker spacing is frame duration, nothing else.

Link copied to clipboard

How often a figure's silhouette repeats: the autocorrelation of its root-aligned masks, scored as the mean intersection over union of every frame with the frame lag later. The best lag wins; of equally good lags the shortest, so a clip holding three repeats reports one.