tracksperanto 2.12.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/DEVELOPER_DOCS.rdoc +15 -8
  2. data/History.txt +21 -14
  3. data/Rakefile +1 -0
  4. data/bin/tracksperanto +30 -29
  5. data/lib/export/flame_stabilizer_cornerpin.rb +4 -2
  6. data/lib/export/pfmatchit.rb +8 -1
  7. data/lib/export/pftrack.rb +8 -1
  8. data/lib/import/pftrack.rb +4 -1
  9. data/lib/import/syntheyes.rb +2 -2
  10. data/lib/pipeline/base.rb +13 -13
  11. data/lib/{middleware → tools}/base.rb +7 -7
  12. data/lib/{middleware → tools}/crop.rb +3 -3
  13. data/lib/{middleware → tools}/flip.rb +2 -2
  14. data/lib/{middleware → tools}/flop.rb +2 -2
  15. data/lib/{middleware → tools}/golden.rb +2 -2
  16. data/lib/{middleware → tools}/length_cutoff.rb +2 -2
  17. data/lib/{middleware → tools}/lens_disto.rb +2 -2
  18. data/lib/{middleware → tools}/lerp.rb +2 -2
  19. data/lib/{middleware → tools}/lint.rb +1 -1
  20. data/lib/{middleware → tools}/move_to_first.rb +3 -3
  21. data/lib/{middleware → tools}/pad.rb +2 -2
  22. data/lib/{middleware → tools}/prefix.rb +2 -2
  23. data/lib/{middleware → tools}/reformat.rb +3 -3
  24. data/lib/{middleware → tools}/scaler.rb +1 -1
  25. data/lib/{middleware → tools}/shift.rb +2 -2
  26. data/lib/{middleware → tools}/slipper.rb +1 -1
  27. data/lib/tools/start_trim.rb +17 -0
  28. data/lib/tracksperanto/pf_coords.rb +9 -0
  29. data/lib/tracksperanto/simple_export.rb +1 -1
  30. data/lib/tracksperanto/uv_coordinates.rb +15 -13
  31. data/lib/tracksperanto.rb +16 -15
  32. data/test/export/samples/ref_PFMatchit.2dt +39 -39
  33. data/test/export/samples/ref_PFTrack.2dt +39 -39
  34. data/test/export/samples/ref_PFTrack5.2dt +39 -39
  35. data/test/export/samples/ref_Syntheyes.txt +39 -39
  36. data/test/import/test_pftrack_import.rb +5 -5
  37. data/test/import/test_shake_script_import.rb +9 -1
  38. data/test/import/test_syntheyes_import.rb +3 -3
  39. data/test/subpixel/Flame_Smk2013_SubpixSample.stabilizer +310 -0
  40. data/test/subpixel/julik_pftrack.txt +14 -0
  41. data/test/subpixel/shake_subpix_v01.shk +308 -0
  42. data/test/subpixel/subpix_import_test.rb +75 -0
  43. data/test/subpixel/subpixel_grid.ifl +1 -0
  44. data/test/subpixel/subpixel_grid.sni +0 -0
  45. data/test/subpixel/subpixel_grid.tif +0 -0
  46. data/test/subpixel/sy_subpix_2dpaths.txt +4 -0
  47. data/test/test_const_name.rb +2 -2
  48. data/test/test_pipeline.rb +10 -10
  49. data/test/test_tracksperanto.rb +11 -11
  50. data/test/test_uv_coords.rb +29 -0
  51. data/test/{middleware → tools}/test_crop_middleware.rb +4 -4
  52. data/test/{middleware → tools}/test_flip_middleware.rb +3 -3
  53. data/test/{middleware → tools}/test_flop_middleware.rb +3 -3
  54. data/test/{middleware → tools}/test_golden_middleware.rb +3 -3
  55. data/test/{middleware → tools}/test_length_cutoff_middleware.rb +5 -5
  56. data/test/{middleware → tools}/test_lens_middleware.rb +9 -9
  57. data/test/{middleware → tools}/test_lerp_middleware.rb +3 -3
  58. data/test/{middleware → tools}/test_lint_middleware.rb +11 -11
  59. data/test/{middleware → tools}/test_move_to_first_frame_middleware.rb +3 -3
  60. data/test/{middleware → tools}/test_pad_middleware.rb +4 -4
  61. data/test/{middleware → tools}/test_prefix.rb +5 -5
  62. data/test/{middleware → tools}/test_reformat_middleware.rb +5 -5
  63. data/test/{middleware → tools}/test_scaler_middleware.rb +7 -7
  64. data/test/{middleware → tools}/test_shift_middleware.rb +4 -4
  65. data/test/{middleware → tools}/test_slip_middleware.rb +5 -5
  66. data/test/{middleware → tools}/test_start_trim_middleware.rb +3 -3
  67. data/tracksperanto.gemspec +45 -35
  68. metadata +46 -36
  69. data/lib/middleware/start_trim.rb +0 -17
@@ -1,8 +1,8 @@
1
1
  # -*- encoding : utf-8 -*-
2
- # This middleware pads the comp or crops it if given negative values. Use it to say unpad
2
+ # This tool pads the comp or crops it if given negative values. Use it to say unpad
3
3
  # some fucked-up telecine transfers. The padding is in fractional units of the total width
4
4
  # and height
5
- class Tracksperanto::Middleware::Pad < Tracksperanto::Middleware::Base
5
+ class Tracksperanto::Tool::Pad < Tracksperanto::Tool::Base
6
6
 
7
7
  parameter :top_pad, :cast => :float, :desc => "Top padding (fraction of original size)"
8
8
  parameter :left_pad, :cast => :float, :desc => "Left padding (fraction of original size)"
@@ -1,7 +1,7 @@
1
1
  # -*- encoding : utf-8 -*-
2
- # This middleware prepends the names of the trackers passing through it with a prefix
2
+ # This tool prepends the names of the trackers passing through it with a prefix
3
3
  # and an underscore
4
- class Tracksperanto::Middleware::Prefix < Tracksperanto::Middleware::Base
4
+ class Tracksperanto::Tool::Prefix < Tracksperanto::Tool::Base
5
5
 
6
6
  parameter :prefix, :cast => :string, :desc => "The prefix to apply", :default => "trk_"
7
7
 
@@ -1,9 +1,9 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  require File.dirname(__FILE__) + '/scaler'
3
3
 
4
- # This middleware reformats (scales) the track setup to a specific pixel resolution. Very useful for
4
+ # This tool reformats (scales) the track setup to a specific pixel resolution. Very useful for
5
5
  # applying proxy tracks to full-res images
6
- class Tracksperanto::Middleware::Reformat < Tracksperanto::Middleware::Base
6
+ class Tracksperanto::Tool::Reformat < Tracksperanto::Tool::Base
7
7
 
8
8
  parameter :width, :cast => :int, :desc => "New comp width in px", :default => 1080
9
9
  parameter :height, :cast => :int, :desc => "New comp height in px", :default => 1080
@@ -20,7 +20,7 @@ class Tracksperanto::Middleware::Reformat < Tracksperanto::Middleware::Base
20
20
  x_factor, y_factor = (@width / img_width.to_f), (@height / img_height.to_f)
21
21
 
22
22
  @stash = @exporter
23
- @exporter = Tracksperanto::Middleware::Scaler.new(@exporter, :x_factor => x_factor, :y_factor => y_factor)
23
+ @exporter = Tracksperanto::Tool::Scaler.new(@exporter, :x_factor => x_factor, :y_factor => y_factor)
24
24
  super
25
25
  end
26
26
  end
@@ -1,6 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  # Scales the comp being exported by a specific factor, together with the tracker keyframes
3
- class Tracksperanto::Middleware::Scaler < Tracksperanto::Middleware::Base
3
+ class Tracksperanto::Tool::Scaler < Tracksperanto::Tool::Base
4
4
  DEFAULT_FACTOR = 1
5
5
 
6
6
  parameter :x_factor, :cast => :float, :desc => "Factor to scale by", :default => DEFAULT_FACTOR
@@ -1,6 +1,6 @@
1
1
  # -*- encoding : utf-8 -*-
2
- # This middleware moves the keyframs by a preset number of pixels
3
- class Tracksperanto::Middleware::Shift < Tracksperanto::Middleware::Base
2
+ # This tool moves the keyframs by a preset number of pixels
3
+ class Tracksperanto::Tool::Shift < Tracksperanto::Tool::Base
4
4
 
5
5
  parameter :x_shift, :cast => :float, :desc => "Amount of horizontal shift (in px)", :default => 0
6
6
  parameter :y_shift, :cast => :float, :desc => "Amount of vertical shift (in px)", :default => 0
@@ -1,7 +1,7 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  # Slips the keyframe positions by a specific integer amount of frames, positive values slip forward (later in time). Useful if you just edited some stuff onto
3
3
  # the beginning if your sequence and need to extend your tracks.
4
- class Tracksperanto::Middleware::Slipper < Tracksperanto::Middleware::Base
4
+ class Tracksperanto::Tool::Slipper < Tracksperanto::Tool::Base
5
5
 
6
6
  parameter :slip, :cast => :int, :desc => "Number of frames to slip related to the current frames", :default => 0
7
7
 
@@ -0,0 +1,17 @@
1
+ # -*- encoding : utf-8 -*-
2
+ # This tool removes all keyframes before frame 0, and skips trackers entirely if they are all before frame 0
3
+ class Tracksperanto::Tool::StartTrim < Tracksperanto::Tool::Base
4
+
5
+ def self.action_description
6
+ "Remove all the keyframes that are on frames below 1"
7
+ end
8
+
9
+ def start_export( img_width, img_height)
10
+ @exporter = Tracksperanto::Tool::LengthCutoff.new(@exporter, :min_length => 1) # Ensure at least one keyframe
11
+ super
12
+ end
13
+
14
+ def export_point(frame, float_x, float_y, float_residual)
15
+ return super unless frame < 0
16
+ end
17
+ end
@@ -0,0 +1,9 @@
1
+ module Tracksperanto::PFCoords
2
+ def to_pfcoord(xperanto_value)
3
+ xperanto_value.to_f - 0.5
4
+ end
5
+
6
+ def from_pfcoord(pf_value)
7
+ pf_value.to_f + 0.5
8
+ end
9
+ end
@@ -6,7 +6,7 @@ module Tracksperanto::SimpleExport
6
6
  # Before calling this, initialize the exporter with the proper
7
7
  # IO handle
8
8
  def just_export(trackers_array, comp_width, comp_height)
9
- lint = Tracksperanto::Middleware::Lint.new(self)
9
+ lint = Tracksperanto::Tool::Lint.new(self)
10
10
 
11
11
  lint.start_export(comp_width, comp_height)
12
12
  trackers_array.each do | t |
@@ -1,23 +1,25 @@
1
1
  # -*- encoding : utf-8 -*-
2
- # Syntheyes and some other apps use a relative UV coordinate sustem. For Syntheyes, zero is at the
3
- # optical center of the image, and goes positive right and up. Since Tracksperanto works in absolute
4
- # pixels we need to convert to and fro.
2
+ # For Syntheyes, zero is at the
3
+ # optical center of the image, and goes positive right and up. The corners get the [-1..1] coordinates
4
+ # respectively. Since Tracksperanto works in absolute pixels we need to convert to and from these cords.
5
+ # Note that Syntheyes actually assumes the center of the first pixel to be at -1,1 so a small
6
+ # adjustment is necessary to maintain subpixel accuracy.
5
7
  module Tracksperanto::UVCoordinates
6
8
 
7
- # UV coords used by Syntheyes and it's lens distortion algos.
9
+ # Convert absoilute X and Y values off the BL corner into Syntheyes UV coordinates
8
10
  def absolute_to_uv(abs_x, abs_y, w, h)
9
11
  [convert_to_uv(abs_x, w), convert_to_uv(abs_y, h) * -1]
10
12
  end
11
13
 
12
- def convert_to_uv(absolute_value, absolute_side)
13
- x = (absolute_value / absolute_side.to_f) - 0.5
14
- # .2 to -.3, y is reversed and coords are double
15
- x * 2
14
+ # Convert absoilute pixel value off the BL corner into Syntheyes UV coordinate
15
+ def convert_to_uv(abs_value, absolute_side)
16
+ uv_value = (((abs_value.to_f - 0.5) / (absolute_side.to_f - 1)) - 0.5) * 2.0
16
17
  end
17
-
18
- def convert_from_uv(absolute_side, uv_value)
19
- # First, start from zero (-.1 becomes .4)
20
- value_off_corner = (uv_value.to_f / 2) + 0.5
21
- absolute_side * value_off_corner
18
+
19
+ # Convert Syntheyes UV value into absoilute pixel value off the BL corner
20
+ def convert_from_uv(uv_value, absolute_side)
21
+ # Account for the fact that Syntheyes assumes the
22
+ # pixel values to be at the center of the pixel
23
+ abs_value = (((uv_value.to_f / 2.0) + 0.5) * (absolute_side.to_f - 1)) + 0.5
22
24
  end
23
25
  end
data/lib/tracksperanto.rb CHANGED
@@ -3,16 +3,16 @@
3
3
 
4
4
  module Tracksperanto
5
5
  PATH = File.expand_path(File.dirname(__FILE__))
6
- VERSION = '2.12.0'
6
+ VERSION = '3.0.0'
7
7
 
8
8
  module Import; end
9
9
  module Export; end
10
- module Middleware; end
10
+ module Tool; end
11
11
  module Pipeline; end
12
12
 
13
13
  class UnknownExporterError < NameError; end
14
14
  class UnknownImporterError < NameError; end
15
- class UnknownMiddlewareError < NameError; end
15
+ class UnknownToolError < NameError; end
16
16
 
17
17
  class << self
18
18
  # Returns the array of all exporter classes defined
@@ -21,8 +21,8 @@ module Tracksperanto
21
21
  # Returns the array of all importer classes defined
22
22
  attr_accessor :importers
23
23
 
24
- # Returns the array of all available middlewares
25
- attr_accessor :middlewares
24
+ # Returns the array of all available tools
25
+ attr_accessor :tools
26
26
 
27
27
  # Returns the names of all the importers
28
28
  def importer_names
@@ -34,9 +34,9 @@ module Tracksperanto
34
34
  exporters.map{|e| e.const_name }
35
35
  end
36
36
 
37
- # Returns the names of all the middlewares
38
- def middleware_names
39
- middlewares.map{|e| e.const_name }
37
+ # Returns the names of all the tools
38
+ def tool_names
39
+ tools.map{|e| e.const_name }
40
40
  end
41
41
 
42
42
  def exporters
@@ -55,15 +55,15 @@ module Tracksperanto
55
55
  end
56
56
  end
57
57
 
58
- self.exporters, self.importers, self.middlewares = [], [], []
58
+ self.exporters, self.importers, self.tools = [], [], []
59
59
 
60
- # Case-insensitive search for a middleware class by name
61
- def self.get_middleware(name)
62
- middlewares.each do | x |
60
+ # Case-insensitive search for a tool class by name
61
+ def self.get_tool(name)
62
+ tools.each do | x |
63
63
  return x if x.const_name.downcase == name.downcase
64
64
  end
65
65
 
66
- raise UnknownMiddlewareError, "Unknown middleware #{name.inspect}"
66
+ raise UnknownToolError, "Unknown tool #{name.inspect}"
67
67
  end
68
68
 
69
69
  # Case-insensitive search for an export module by name
@@ -103,6 +103,7 @@ end
103
103
  buffering_reader
104
104
  parameters
105
105
  yield_non_empty
106
+ pf_coords
106
107
  ).each do | submodule |
107
108
  require File.join(Tracksperanto::PATH, "tracksperanto", submodule)
108
109
  end
@@ -117,8 +118,8 @@ Dir.glob(File.dirname(__FILE__) + '/export/*.rb').sort.each do | i |
117
118
  require i
118
119
  end
119
120
 
120
- # Load middleware
121
- Dir.glob(File.dirname(__FILE__) + '/middleware/*.rb').sort.each do | i |
121
+ # Load tool
122
+ Dir.glob(File.dirname(__FILE__) + '/tools/*.rb').sort.each do | i |
122
123
  require i
123
124
  end
124
125
 
@@ -3,52 +3,52 @@
3
3
  "Parabolic_1_from_top_left"
4
4
  1
5
5
  19
6
- 1 0.000 1080.000 0.000
7
- 2 96.000 874.800 0.006
8
- 3 192.000 691.200 0.012
9
- 4 288.000 529.200 0.018
10
- 5 384.000 388.800 0.024
11
- 6 480.000 270.000 0.030
12
- 7 576.000 172.800 0.036
13
- 8 672.000 97.200 0.042
14
- 9 768.000 43.200 0.048
15
- 10 864.000 10.800 0.054
16
- 13 1152.000 43.200 0.071
17
- 14 1248.000 97.200 0.077
18
- 15 1344.000 172.800 0.083
19
- 16 1440.000 270.000 0.089
20
- 17 1536.000 388.800 0.095
21
- 18 1632.000 529.200 0.101
22
- 19 1728.000 691.200 0.107
23
- 20 1824.000 874.800 0.113
24
- 21 1920.000 1080.000 0.119
6
+ 1 -0.500 1079.500 0.000
7
+ 2 95.500 874.300 0.006
8
+ 3 191.500 690.700 0.012
9
+ 4 287.500 528.700 0.018
10
+ 5 383.500 388.300 0.024
11
+ 6 479.500 269.500 0.030
12
+ 7 575.500 172.300 0.036
13
+ 8 671.500 96.700 0.042
14
+ 9 767.500 42.700 0.048
15
+ 10 863.500 10.300 0.054
16
+ 13 1151.500 42.700 0.071
17
+ 14 1247.500 96.700 0.077
18
+ 15 1343.500 172.300 0.083
19
+ 16 1439.500 269.500 0.089
20
+ 17 1535.500 388.300 0.095
21
+ 18 1631.500 528.700 0.101
22
+ 19 1727.500 690.700 0.107
23
+ 20 1823.500 874.300 0.113
24
+ 21 1919.500 1079.500 0.119
25
25
 
26
26
 
27
27
  "Parabolic_2_from_bottom_right"
28
28
  1
29
29
  19
30
- 1 1920.000 0.000 0.000
31
- 2 1824.000 205.200 0.006
32
- 3 1728.000 388.800 0.012
33
- 4 1632.000 550.800 0.018
34
- 5 1536.000 691.200 0.024
35
- 6 1440.000 810.000 0.030
36
- 7 1344.000 907.200 0.036
37
- 8 1248.000 982.800 0.042
38
- 9 1152.000 1036.800 0.048
39
- 10 1056.000 1069.200 0.054
40
- 13 768.000 1036.800 0.071
41
- 14 672.000 982.800 0.077
42
- 15 576.000 907.200 0.083
43
- 16 480.000 810.000 0.089
44
- 17 384.000 691.200 0.095
45
- 18 288.000 550.800 0.101
46
- 19 192.000 388.800 0.107
47
- 20 96.000 205.200 0.113
48
- 21 0.000 0.000 0.119
30
+ 1 1919.500 -0.500 0.000
31
+ 2 1823.500 204.700 0.006
32
+ 3 1727.500 388.300 0.012
33
+ 4 1631.500 550.300 0.018
34
+ 5 1535.500 690.700 0.024
35
+ 6 1439.500 809.500 0.030
36
+ 7 1343.500 906.700 0.036
37
+ 8 1247.500 982.300 0.042
38
+ 9 1151.500 1036.300 0.048
39
+ 10 1055.500 1068.700 0.054
40
+ 13 767.500 1036.300 0.071
41
+ 14 671.500 982.300 0.077
42
+ 15 575.500 906.700 0.083
43
+ 16 479.500 809.500 0.089
44
+ 17 383.500 690.700 0.095
45
+ 18 287.500 550.300 0.101
46
+ 19 191.500 388.300 0.107
47
+ 20 95.500 204.700 0.113
48
+ 21 -0.500 -0.500 0.119
49
49
 
50
50
 
51
51
  "SingleFrame_InTheMiddle"
52
52
  1
53
53
  1
54
- 1 970.000 550.000 0.000
54
+ 1 969.500 549.500 0.000
@@ -2,50 +2,50 @@
2
2
 
3
3
  "Parabolic_1_from_top_left"
4
4
  19
5
- 0 0.000 1080.000 0.000
6
- 1 96.000 874.800 0.006
7
- 2 192.000 691.200 0.012
8
- 3 288.000 529.200 0.018
9
- 4 384.000 388.800 0.024
10
- 5 480.000 270.000 0.030
11
- 6 576.000 172.800 0.036
12
- 7 672.000 97.200 0.042
13
- 8 768.000 43.200 0.048
14
- 9 864.000 10.800 0.054
15
- 12 1152.000 43.200 0.071
16
- 13 1248.000 97.200 0.077
17
- 14 1344.000 172.800 0.083
18
- 15 1440.000 270.000 0.089
19
- 16 1536.000 388.800 0.095
20
- 17 1632.000 529.200 0.101
21
- 18 1728.000 691.200 0.107
22
- 19 1824.000 874.800 0.113
23
- 20 1920.000 1080.000 0.119
5
+ 0 -0.500 1079.500 0.000
6
+ 1 95.500 874.300 0.006
7
+ 2 191.500 690.700 0.012
8
+ 3 287.500 528.700 0.018
9
+ 4 383.500 388.300 0.024
10
+ 5 479.500 269.500 0.030
11
+ 6 575.500 172.300 0.036
12
+ 7 671.500 96.700 0.042
13
+ 8 767.500 42.700 0.048
14
+ 9 863.500 10.300 0.054
15
+ 12 1151.500 42.700 0.071
16
+ 13 1247.500 96.700 0.077
17
+ 14 1343.500 172.300 0.083
18
+ 15 1439.500 269.500 0.089
19
+ 16 1535.500 388.300 0.095
20
+ 17 1631.500 528.700 0.101
21
+ 18 1727.500 690.700 0.107
22
+ 19 1823.500 874.300 0.113
23
+ 20 1919.500 1079.500 0.119
24
24
 
25
25
 
26
26
  "Parabolic_2_from_bottom_right"
27
27
  19
28
- 0 1920.000 0.000 0.000
29
- 1 1824.000 205.200 0.006
30
- 2 1728.000 388.800 0.012
31
- 3 1632.000 550.800 0.018
32
- 4 1536.000 691.200 0.024
33
- 5 1440.000 810.000 0.030
34
- 6 1344.000 907.200 0.036
35
- 7 1248.000 982.800 0.042
36
- 8 1152.000 1036.800 0.048
37
- 9 1056.000 1069.200 0.054
38
- 12 768.000 1036.800 0.071
39
- 13 672.000 982.800 0.077
40
- 14 576.000 907.200 0.083
41
- 15 480.000 810.000 0.089
42
- 16 384.000 691.200 0.095
43
- 17 288.000 550.800 0.101
44
- 18 192.000 388.800 0.107
45
- 19 96.000 205.200 0.113
46
- 20 0.000 0.000 0.119
28
+ 0 1919.500 -0.500 0.000
29
+ 1 1823.500 204.700 0.006
30
+ 2 1727.500 388.300 0.012
31
+ 3 1631.500 550.300 0.018
32
+ 4 1535.500 690.700 0.024
33
+ 5 1439.500 809.500 0.030
34
+ 6 1343.500 906.700 0.036
35
+ 7 1247.500 982.300 0.042
36
+ 8 1151.500 1036.300 0.048
37
+ 9 1055.500 1068.700 0.054
38
+ 12 767.500 1036.300 0.071
39
+ 13 671.500 982.300 0.077
40
+ 14 575.500 906.700 0.083
41
+ 15 479.500 809.500 0.089
42
+ 16 383.500 690.700 0.095
43
+ 17 287.500 550.300 0.101
44
+ 18 191.500 388.300 0.107
45
+ 19 95.500 204.700 0.113
46
+ 20 -0.500 -0.500 0.119
47
47
 
48
48
 
49
49
  "SingleFrame_InTheMiddle"
50
50
  1
51
- 0 970.000 550.000 0.000
51
+ 0 969.500 549.500 0.000
@@ -3,52 +3,52 @@
3
3
  "Parabolic_1_from_top_left"
4
4
  "Primary"
5
5
  19
6
- 0 0.000 1080.000 0.000
7
- 1 96.000 874.800 0.006
8
- 2 192.000 691.200 0.012
9
- 3 288.000 529.200 0.018
10
- 4 384.000 388.800 0.024
11
- 5 480.000 270.000 0.030
12
- 6 576.000 172.800 0.036
13
- 7 672.000 97.200 0.042
14
- 8 768.000 43.200 0.048
15
- 9 864.000 10.800 0.054
16
- 12 1152.000 43.200 0.071
17
- 13 1248.000 97.200 0.077
18
- 14 1344.000 172.800 0.083
19
- 15 1440.000 270.000 0.089
20
- 16 1536.000 388.800 0.095
21
- 17 1632.000 529.200 0.101
22
- 18 1728.000 691.200 0.107
23
- 19 1824.000 874.800 0.113
24
- 20 1920.000 1080.000 0.119
6
+ 0 -0.500 1079.500 0.000
7
+ 1 95.500 874.300 0.006
8
+ 2 191.500 690.700 0.012
9
+ 3 287.500 528.700 0.018
10
+ 4 383.500 388.300 0.024
11
+ 5 479.500 269.500 0.030
12
+ 6 575.500 172.300 0.036
13
+ 7 671.500 96.700 0.042
14
+ 8 767.500 42.700 0.048
15
+ 9 863.500 10.300 0.054
16
+ 12 1151.500 42.700 0.071
17
+ 13 1247.500 96.700 0.077
18
+ 14 1343.500 172.300 0.083
19
+ 15 1439.500 269.500 0.089
20
+ 16 1535.500 388.300 0.095
21
+ 17 1631.500 528.700 0.101
22
+ 18 1727.500 690.700 0.107
23
+ 19 1823.500 874.300 0.113
24
+ 20 1919.500 1079.500 0.119
25
25
 
26
26
 
27
27
  "Parabolic_2_from_bottom_right"
28
28
  "Primary"
29
29
  19
30
- 0 1920.000 0.000 0.000
31
- 1 1824.000 205.200 0.006
32
- 2 1728.000 388.800 0.012
33
- 3 1632.000 550.800 0.018
34
- 4 1536.000 691.200 0.024
35
- 5 1440.000 810.000 0.030
36
- 6 1344.000 907.200 0.036
37
- 7 1248.000 982.800 0.042
38
- 8 1152.000 1036.800 0.048
39
- 9 1056.000 1069.200 0.054
40
- 12 768.000 1036.800 0.071
41
- 13 672.000 982.800 0.077
42
- 14 576.000 907.200 0.083
43
- 15 480.000 810.000 0.089
44
- 16 384.000 691.200 0.095
45
- 17 288.000 550.800 0.101
46
- 18 192.000 388.800 0.107
47
- 19 96.000 205.200 0.113
48
- 20 0.000 0.000 0.119
30
+ 0 1919.500 -0.500 0.000
31
+ 1 1823.500 204.700 0.006
32
+ 2 1727.500 388.300 0.012
33
+ 3 1631.500 550.300 0.018
34
+ 4 1535.500 690.700 0.024
35
+ 5 1439.500 809.500 0.030
36
+ 6 1343.500 906.700 0.036
37
+ 7 1247.500 982.300 0.042
38
+ 8 1151.500 1036.300 0.048
39
+ 9 1055.500 1068.700 0.054
40
+ 12 767.500 1036.300 0.071
41
+ 13 671.500 982.300 0.077
42
+ 14 575.500 906.700 0.083
43
+ 15 479.500 809.500 0.089
44
+ 16 383.500 690.700 0.095
45
+ 17 287.500 550.300 0.101
46
+ 18 191.500 388.300 0.107
47
+ 19 95.500 204.700 0.113
48
+ 20 -0.500 -0.500 0.119
49
49
 
50
50
 
51
51
  "SingleFrame_InTheMiddle"
52
52
  "Primary"
53
53
  1
54
- 0 970.000 550.000 0.000
54
+ 0 969.500 549.500 0.000
@@ -1,39 +1,39 @@
1
- Parabolic1FromTopLeft 0 -1.000000 -1.000000 15
2
- Parabolic1FromTopLeft 1 -0.900000 -0.620000 7
3
- Parabolic1FromTopLeft 2 -0.800000 -0.280000 7
4
- Parabolic1FromTopLeft 3 -0.700000 0.020000 7
5
- Parabolic1FromTopLeft 4 -0.600000 0.280000 7
6
- Parabolic1FromTopLeft 5 -0.500000 0.500000 7
7
- Parabolic1FromTopLeft 6 -0.400000 0.680000 7
8
- Parabolic1FromTopLeft 7 -0.300000 0.820000 7
9
- Parabolic1FromTopLeft 8 -0.200000 0.920000 7
10
- Parabolic1FromTopLeft 9 -0.100000 0.980000 7
11
- Parabolic1FromTopLeft 12 0.200000 0.920000 15
12
- Parabolic1FromTopLeft 13 0.300000 0.820000 7
13
- Parabolic1FromTopLeft 14 0.400000 0.680000 7
14
- Parabolic1FromTopLeft 15 0.500000 0.500000 7
15
- Parabolic1FromTopLeft 16 0.600000 0.280000 7
16
- Parabolic1FromTopLeft 17 0.700000 0.020000 7
17
- Parabolic1FromTopLeft 18 0.800000 -0.280000 7
18
- Parabolic1FromTopLeft 19 0.900000 -0.620000 7
19
- Parabolic1FromTopLeft 20 1.000000 -1.000000 7
20
- Parabolic2FromBottomRight 0 1.000000 1.000000 15
21
- Parabolic2FromBottomRight 1 0.900000 0.620000 7
22
- Parabolic2FromBottomRight 2 0.800000 0.280000 7
23
- Parabolic2FromBottomRight 3 0.700000 -0.020000 7
24
- Parabolic2FromBottomRight 4 0.600000 -0.280000 7
25
- Parabolic2FromBottomRight 5 0.500000 -0.500000 7
26
- Parabolic2FromBottomRight 6 0.400000 -0.680000 7
27
- Parabolic2FromBottomRight 7 0.300000 -0.820000 7
28
- Parabolic2FromBottomRight 8 0.200000 -0.920000 7
29
- Parabolic2FromBottomRight 9 0.100000 -0.980000 7
30
- Parabolic2FromBottomRight 12 -0.200000 -0.920000 15
31
- Parabolic2FromBottomRight 13 -0.300000 -0.820000 7
32
- Parabolic2FromBottomRight 14 -0.400000 -0.680000 7
33
- Parabolic2FromBottomRight 15 -0.500000 -0.500000 7
34
- Parabolic2FromBottomRight 16 -0.600000 -0.280000 7
35
- Parabolic2FromBottomRight 17 -0.700000 -0.020000 7
36
- Parabolic2FromBottomRight 18 -0.800000 0.280000 7
37
- Parabolic2FromBottomRight 19 -0.900000 0.620000 7
38
- Parabolic2FromBottomRight 20 -1.000000 1.000000 7
39
- SingleFrameInTheMiddle 0 0.010417 -0.018519 15
1
+ Parabolic1FromTopLeft 0 -1.000521 -1.000927 15
2
+ Parabolic1FromTopLeft 1 -0.900469 -0.620575 7
3
+ Parabolic1FromTopLeft 2 -0.800417 -0.280259 7
4
+ Parabolic1FromTopLeft 3 -0.700365 0.020019 7
5
+ Parabolic1FromTopLeft 4 -0.600313 0.280259 7
6
+ Parabolic1FromTopLeft 5 -0.500261 0.500463 7
7
+ Parabolic1FromTopLeft 6 -0.400208 0.680630 7
8
+ Parabolic1FromTopLeft 7 -0.300156 0.820760 7
9
+ Parabolic1FromTopLeft 8 -0.200104 0.920853 7
10
+ Parabolic1FromTopLeft 9 -0.100052 0.980908 7
11
+ Parabolic1FromTopLeft 12 0.200104 0.920853 15
12
+ Parabolic1FromTopLeft 13 0.300156 0.820760 7
13
+ Parabolic1FromTopLeft 14 0.400208 0.680630 7
14
+ Parabolic1FromTopLeft 15 0.500261 0.500463 7
15
+ Parabolic1FromTopLeft 16 0.600313 0.280259 7
16
+ Parabolic1FromTopLeft 17 0.700365 0.020019 7
17
+ Parabolic1FromTopLeft 18 0.800417 -0.280259 7
18
+ Parabolic1FromTopLeft 19 0.900469 -0.620575 7
19
+ Parabolic1FromTopLeft 20 1.000521 -1.000927 7
20
+ Parabolic2FromBottomRight 0 1.000521 1.000927 15
21
+ Parabolic2FromBottomRight 1 0.900469 0.620575 7
22
+ Parabolic2FromBottomRight 2 0.800417 0.280259 7
23
+ Parabolic2FromBottomRight 3 0.700365 -0.020019 7
24
+ Parabolic2FromBottomRight 4 0.600313 -0.280259 7
25
+ Parabolic2FromBottomRight 5 0.500261 -0.500463 7
26
+ Parabolic2FromBottomRight 6 0.400208 -0.680630 7
27
+ Parabolic2FromBottomRight 7 0.300156 -0.820760 7
28
+ Parabolic2FromBottomRight 8 0.200104 -0.920853 7
29
+ Parabolic2FromBottomRight 9 0.100052 -0.980908 7
30
+ Parabolic2FromBottomRight 12 -0.200104 -0.920853 15
31
+ Parabolic2FromBottomRight 13 -0.300156 -0.820760 7
32
+ Parabolic2FromBottomRight 14 -0.400208 -0.680630 7
33
+ Parabolic2FromBottomRight 15 -0.500261 -0.500463 7
34
+ Parabolic2FromBottomRight 16 -0.600313 -0.280259 7
35
+ Parabolic2FromBottomRight 17 -0.700365 -0.020019 7
36
+ Parabolic2FromBottomRight 18 -0.800417 0.280259 7
37
+ Parabolic2FromBottomRight 19 -0.900469 0.620575 7
38
+ Parabolic2FromBottomRight 20 -1.000521 1.000927 7
39
+ SingleFrameInTheMiddle 0 0.010422 -0.018536 15
@@ -38,12 +38,12 @@ class PFTrackImportTest < Test::Unit::TestCase
38
38
  assert_equal 341, trackers[0].keyframes.length
39
39
 
40
40
  assert_equal 41, first_kf.frame
41
- assert_in_delta 984.611, first_kf.abs_x, DELTA
42
- assert_in_delta 30.220, first_kf.abs_y, DELTA
41
+ assert_in_delta 985.111, first_kf.abs_x, DELTA
42
+ assert_in_delta 30.72, first_kf.abs_y, DELTA
43
43
  assert_in_delta 0.0, first_kf.residual, DELTA
44
44
 
45
45
  last_kf = trackers[0].keyframes[-1]
46
- assert_in_delta 729.330, last_kf.abs_x, DELTA
46
+ assert_in_delta 729.83, last_kf.abs_x, DELTA
47
47
 
48
48
  assert_equal "Tracker41", trackers[-1].name
49
49
  assert_equal 467, trackers[-1].keyframes.length
@@ -83,11 +83,11 @@ class PFTrackImportTest < Test::Unit::TestCase
83
83
 
84
84
  assert_equal "Auto_00016_Primary", acc[18].name
85
85
  assert_equal 34, acc[18].length
86
- assert_in_delta 1331.017, acc[18][0].abs_x, DELTA
86
+ assert_in_delta 1331.517, acc[18][0].abs_x, DELTA
87
87
 
88
88
  assert_equal "Auto_00016_Secondary", acc[19].name
89
89
  assert_equal 34, acc[19].length
90
- assert_in_delta 1335.609, acc[19][0].abs_x, DELTA
90
+ assert_in_delta 1336.109, acc[19][0].abs_x, DELTA
91
91
 
92
92
  assert_equal "Auto_00021_Primary", acc[20].name
93
93
  assert_equal 0, acc[20].length
@@ -54,7 +54,15 @@ class ShakeScriptImportTest < Test::Unit::TestCase
54
54
  assert_equal "Tracker1_track2", t2.name
55
55
 
56
56
  end
57
-
57
+
58
+ ### Disabled for now, I don't feel like overhauling the Shake parser ATM
59
+ # def test_parsing_case
60
+ # fixture = File.open(File.dirname(__FILE__) + '/samples/shake_script/205_030_shaketrack_v01_pd.shk')
61
+ # trackers = Tracksperanto::Import::ShakeScript.new(:io => fixture).to_a
62
+ # assert_equal 3, trackers.length
63
+ # end
64
+ ###
65
+
58
66
  def test_parsing_three_tracks_in_one_stabilizer_node
59
67
  fixture = File.open(File.dirname(__FILE__) + '/samples/shake_script/three_tracks_in_one_stabilizer.shk')
60
68