Sha256: d74c1104570bd28dc4a2893caa73b3c582015a7f8853a7028c65dc77de5807c1

Contents?: true

Size: 714 Bytes

Versions: 1

Compression:

Stored size: 714 Bytes

Contents

# Export for PFTrack .2dt files for version 2011
class Tracksperanto::Export::PFTrack2011 < Tracksperanto::Export::PFMatchit
    
    def self.desc_and_extension
      "pftrack_2011.txt"
    end
    
    def self.human_name
      "PFTrack 2011 .txt file (single camera)"
    end
    
    def export_point(frame, abs_float_x, abs_float_y, float_residual)
      @frame_count += 1
      # PFTrack 2011 wants one-based frames
      line = KEYFRAME_TEMPLATE % [frame + 1, abs_float_x, abs_float_y, float_residual / 8]
      @tracker_io.write(line)
      @tracker_io.write(linebreak)
    end
    
    private
    
    def camera_name
      "1"
    end
    
    # PFT2011 wants \n
    def linebreak
      "\n"
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tracksperanto-2.4.1 lib/export/pftrack_2011.rb