Cycle Detector
object CycleDetector
Finds a clip's cycle and proposes its key frames:
the masks are shifted by the RootTrack, so a figure walking across stands still;
the RepeatPeriod of those masks within the settings' period bounds;
the ContactFinder's contact frames at that repeat;
CycleSettings.keyFrames key frames spread evenly over one cycle — the repeat times CycleSettings.repeatsPerCycle — starting at the first contact that leaves a whole cycle.
A clip that does not loop, or is too short to repeat within the bounds, gets its key frames spread evenly across its whole length instead.
Functions
Link copied to clipboard
fun analyse(masks: List<Mask>, track: RootTrack, frameRate: FrameRate, settings: CycleSettings, loop: Boolean): CycleAnalysis
The CycleAnalysis of masks with root track at frameRate; a clip that does not loop is spread evenly.