lib/export/boujou.rb in tracksperanto-1.9.3 vs lib/export/boujou.rb in tracksperanto-1.9.4
- old
+ new
@@ -8,15 +8,17 @@
def self.human_name
"boujou feature tracks"
end
DATETIME_FORMAT = '%a %b %d %H:%M:%S %Y'
- PREAMBLE = "#boujou 2d tracks export: text\n# boujou version: 4.1.0 28444\n" +
- "#Creation date : %s\n# track_id view x y"
+ PREAMBLE = %[# boujou 2d tracks export: text
+# boujou version: 4.1.0 28444
+# Creation date : %s
+#
+# track_id view x y]
+ POINT_T = "%s %d %.3f %.3f"
- TEMPLATE = "%s %d %.3f %.3f"
-
def start_export( img_width, img_height)
@height = img_height
@io.puts(PREAMBLE % Time.now.strftime(DATETIME_FORMAT))
end
@@ -24,8 +26,8 @@
@tracker_name = tracker_name
end
def export_point(frame, abs_float_x, abs_float_y, float_residual)
height_inv = @height - abs_float_y
- @io.write(TEMPLATE % [@tracker_name, frame + 1, abs_float_x, height_inv])
+ @io.puts(POINT_T % [@tracker_name, frame + 1, abs_float_x, height_inv])
end
end
\ No newline at end of file