Class: Tracksperanto::Export::SynthEyes

Inherits:
Base
  • Object
show all
Defined in:
lib/export/syntheyes.rb

Overview

Export for Syntheyes tracker UVs

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, inherited, #initialize

Constructor Details

This class inherits a constructor from Tracksperanto::Export::Base

Class Method Details

.desc_and_extensionObject

Should return the suffix and extension of this export file (like “_flame.stabilizer”)



5
6
7
# File 'lib/export/syntheyes.rb', line 5

def self.desc_and_extension
  "syntheyes_2dt.txt"
end

.human_nameObject



9
10
11
# File 'lib/export/syntheyes.rb', line 9

def self.human_name
  "Syntheyes 2D tracker .txt file"
end

Instance Method Details

#export_point(frame, abs_float_x, abs_float_y, float_residual) ⇒ Object



21
22
23
24
# File 'lib/export/syntheyes.rb', line 21

def export_point(frame, abs_float_x, abs_float_y, float_residual)
  values = [@tracker_name, frame] + syntheyes_coords(abs_float_x, abs_float_y, @width, @height)
  @io.puts("%s %d %.6f %.6f 30" % values)
end

#start_export(img_width, img_height) ⇒ Object



13
14
15
# File 'lib/export/syntheyes.rb', line 13

def start_export( img_width, img_height)
  @width, @height = img_width, img_height
end

#start_tracker_segment(tracker_name) ⇒ Object



17
18
19
# File 'lib/export/syntheyes.rb', line 17

def start_tracker_segment(tracker_name)
  @tracker_name = tracker_name
end