← back to roto on ba3a.dev

RootTrack

@Serializable
data class RootTrack(val rootX: List<Double?>, val smoothedX: List<Double>, val anchorX: Int, val shifts: List<Int>)

Where a clip's figure stands, frame by frame. rootX is the root as found, null where a frame showed no figure; smoothedX the gaps filled and the moving average taken; anchorX the whole pixel the smoothed roots centre on; shifts the whole pixels each frame moves right (left when negative) to hold its smoothed root at anchorX — all zero when the clip is not stabilised.

Constructors

Link copied to clipboard
constructor(rootX: List<Double?>, smoothedX: List<Double>, anchorX: Int, shifts: List<Int>)

Properties

Link copied to clipboard

the whole-pixel column the smoothed roots centre on

Link copied to clipboard

the root column in each frame, null where no figure showed

Link copied to clipboard

the whole pixels each frame moves right to hold its root at anchorX

Link copied to clipboard

the root after gap filling and smoothing

Functions

Link copied to clipboard
fun centreX(frame: Int): Int

Where the figure is held in frame as filmed, before shifting: its smoothed root to the whole pixel when stabilised, so a crop centred here follows the figure; anchorX in every frame when not, so the crop stays put.