Class: Tracksperanto::Export::Boujou
- Inherits:
-
Base
- Object
- Base
- Tracksperanto::Export::Boujou
show all
- Defined in:
- lib/export/boujou.rb
Overview
Constant Summary
collapse
- DATETIME_FORMAT =
'%a %b %d %H:%M:%S %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"
Instance Attribute Summary
Attributes inherited from Base
#io
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
#end_export, #end_tracker_segment, #initialize
Methods included from ConstName
#const_name
#just_export
Class Method Details
.desc_and_extension ⇒ Object
4
5
6
|
# File 'lib/export/boujou.rb', line 4
def self.desc_and_extension
"boujou_text.txt"
end
|
.human_name ⇒ Object
8
9
10
|
# File 'lib/export/boujou.rb', line 8
def self.human_name
"boujou feature tracks"
end
|
Instance Method Details
#export_point(frame, abs_float_x, abs_float_y, float_residual) ⇒ Object
29
30
31
32
33
|
# File 'lib/export/boujou.rb', line 29
def export_point(frame, abs_float_x, abs_float_y, float_residual)
height_inv = @height - abs_float_y
@io.puts(POINT_T % [@tracker_name, frame, abs_float_x, height_inv + 1])
end
|
#start_export(img_width, img_height) ⇒ Object
20
21
22
23
|
# File 'lib/export/boujou.rb', line 20
def start_export( img_width, img_height)
@height = img_height
@io.puts(PREAMBLE % Time.now.strftime(DATETIME_FORMAT))
end
|
#start_tracker_segment(tracker_name) ⇒ Object
25
26
27
|
# File 'lib/export/boujou.rb', line 25
def start_tracker_segment(tracker_name)
@tracker_name = tracker_name
end
|