class Tracksperanto::Keyframe
Internal representation of a keyframe, that carries info on the frame location in the clip, x y and residual.
Franme numbers are zero-based (frame 0 is first frame of the clip). X-coordinate (abs_x
) is absolute pixels from lower left corner of the comp to the right Y-coordinate (abs_y
) is absolute pixels from lower left corner of the comp up Residual is how far in pixels the tracker strolls away, and is the inverse of correlation (with total correlation of one the residual excursion becomes zero).
Attributes
abs_x[RW]
Float X value of the point, zero is lower left
abs_y[RW]
Float Y value of the point, zero is lower left
frame[RW]
Integer frame where this keyframe is placed, 0-based
residual[RW]
Float residual (0 is “spot on”)
Public Instance Methods
<=>(another)
click to toggle source
# File lib/tracksperanto/keyframe.rb, line 30 def <=>(another) [frame, abs_x, abs_y, residual] <=> [another.frame, another.abs_x, another.abs_y, another.residual] end
inspect()
click to toggle source
# File lib/tracksperanto/keyframe.rb, line 26 def inspect '#< %.1fx%.1f @%d ~%.2f) >' % [abs_x, abs_y, frame, residual] end