lib/export/match_mover.rb in tracksperanto-1.5.7 vs lib/export/match_mover.rb in tracksperanto-1.6.0

- old
+ new

@@ -14,14 +14,14 @@ TRACKER_POSTAMBLE = "}\n" FIRST_KEYFRAME_TEMPLATE = "\t%d\t %.3f %.3f ki( 0.8 )\t s( 66 66 64 64 ) p( 24 24 25 25 )" KEYFRAME_TEMPLATE = "\t%d\t %.3f %.3f p+( %.6f )\t" def start_export( img_width, img_height) + @height = img_height @io.puts(PREAMBLE.gsub(/2560/, img_width.to_s).gsub(/1080/, img_height.to_s)) end - def start_tracker_segment(tracker_name) @tracker_name = tracker_name @at_first_point = true @io.write(TRACKER_PREAMBLE % tracker_name.inspect) end @@ -30,10 +30,10 @@ @io.write(TRACKER_POSTAMBLE) end def export_point(frame, abs_float_x, abs_float_y, float_residual) template = @at_first_point ? FIRST_KEYFRAME_TEMPLATE : KEYFRAME_TEMPLATE - values = [frame + 1, abs_float_x, abs_float_y, (1 - float_residual)] + values = [frame + 1, abs_float_x, @height - abs_float_y, (1 - float_residual)] @io.puts(template % values) @at_first_point = false end end \ No newline at end of file