tracksperanto 2.12.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/DEVELOPER_DOCS.rdoc +15 -8
- data/History.txt +21 -14
- data/Rakefile +1 -0
- data/bin/tracksperanto +30 -29
- data/lib/export/flame_stabilizer_cornerpin.rb +4 -2
- data/lib/export/pfmatchit.rb +8 -1
- data/lib/export/pftrack.rb +8 -1
- data/lib/import/pftrack.rb +4 -1
- data/lib/import/syntheyes.rb +2 -2
- data/lib/pipeline/base.rb +13 -13
- data/lib/{middleware → tools}/base.rb +7 -7
- data/lib/{middleware → tools}/crop.rb +3 -3
- data/lib/{middleware → tools}/flip.rb +2 -2
- data/lib/{middleware → tools}/flop.rb +2 -2
- data/lib/{middleware → tools}/golden.rb +2 -2
- data/lib/{middleware → tools}/length_cutoff.rb +2 -2
- data/lib/{middleware → tools}/lens_disto.rb +2 -2
- data/lib/{middleware → tools}/lerp.rb +2 -2
- data/lib/{middleware → tools}/lint.rb +1 -1
- data/lib/{middleware → tools}/move_to_first.rb +3 -3
- data/lib/{middleware → tools}/pad.rb +2 -2
- data/lib/{middleware → tools}/prefix.rb +2 -2
- data/lib/{middleware → tools}/reformat.rb +3 -3
- data/lib/{middleware → tools}/scaler.rb +1 -1
- data/lib/{middleware → tools}/shift.rb +2 -2
- data/lib/{middleware → tools}/slipper.rb +1 -1
- data/lib/tools/start_trim.rb +17 -0
- data/lib/tracksperanto/pf_coords.rb +9 -0
- data/lib/tracksperanto/simple_export.rb +1 -1
- data/lib/tracksperanto/uv_coordinates.rb +15 -13
- data/lib/tracksperanto.rb +16 -15
- data/test/export/samples/ref_PFMatchit.2dt +39 -39
- data/test/export/samples/ref_PFTrack.2dt +39 -39
- data/test/export/samples/ref_PFTrack5.2dt +39 -39
- data/test/export/samples/ref_Syntheyes.txt +39 -39
- data/test/import/test_pftrack_import.rb +5 -5
- data/test/import/test_shake_script_import.rb +9 -1
- data/test/import/test_syntheyes_import.rb +3 -3
- data/test/subpixel/Flame_Smk2013_SubpixSample.stabilizer +310 -0
- data/test/subpixel/julik_pftrack.txt +14 -0
- data/test/subpixel/shake_subpix_v01.shk +308 -0
- data/test/subpixel/subpix_import_test.rb +75 -0
- data/test/subpixel/subpixel_grid.ifl +1 -0
- data/test/subpixel/subpixel_grid.sni +0 -0
- data/test/subpixel/subpixel_grid.tif +0 -0
- data/test/subpixel/sy_subpix_2dpaths.txt +4 -0
- data/test/test_const_name.rb +2 -2
- data/test/test_pipeline.rb +10 -10
- data/test/test_tracksperanto.rb +11 -11
- data/test/test_uv_coords.rb +29 -0
- data/test/{middleware → tools}/test_crop_middleware.rb +4 -4
- data/test/{middleware → tools}/test_flip_middleware.rb +3 -3
- data/test/{middleware → tools}/test_flop_middleware.rb +3 -3
- data/test/{middleware → tools}/test_golden_middleware.rb +3 -3
- data/test/{middleware → tools}/test_length_cutoff_middleware.rb +5 -5
- data/test/{middleware → tools}/test_lens_middleware.rb +9 -9
- data/test/{middleware → tools}/test_lerp_middleware.rb +3 -3
- data/test/{middleware → tools}/test_lint_middleware.rb +11 -11
- data/test/{middleware → tools}/test_move_to_first_frame_middleware.rb +3 -3
- data/test/{middleware → tools}/test_pad_middleware.rb +4 -4
- data/test/{middleware → tools}/test_prefix.rb +5 -5
- data/test/{middleware → tools}/test_reformat_middleware.rb +5 -5
- data/test/{middleware → tools}/test_scaler_middleware.rb +7 -7
- data/test/{middleware → tools}/test_shift_middleware.rb +4 -4
- data/test/{middleware → tools}/test_slip_middleware.rb +5 -5
- data/test/{middleware → tools}/test_start_trim_middleware.rb +3 -3
- data/tracksperanto.gemspec +45 -35
- metadata +46 -36
- data/lib/middleware/start_trim.rb +0 -17
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
# This
|
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::
|
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
|
2
|
+
# This tool prepends the names of the trackers passing through it with a prefix
|
3
3
|
# and an underscore
|
4
|
-
class Tracksperanto::
|
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
|
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::
|
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::
|
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::
|
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
|
3
|
-
class Tracksperanto::
|
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::
|
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
|
@@ -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::
|
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
|
-
#
|
3
|
-
# optical center of the image, and goes positive right and up.
|
4
|
-
# pixels we need to convert to and
|
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
|
-
#
|
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
|
-
|
13
|
-
|
14
|
-
|
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
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
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 = '
|
6
|
+
VERSION = '3.0.0'
|
7
7
|
|
8
8
|
module Import; end
|
9
9
|
module Export; end
|
10
|
-
module
|
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
|
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
|
25
|
-
attr_accessor :
|
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
|
38
|
-
def
|
39
|
-
|
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.
|
58
|
+
self.exporters, self.importers, self.tools = [], [], []
|
59
59
|
|
60
|
-
# Case-insensitive search for a
|
61
|
-
def self.
|
62
|
-
|
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
|
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
|
121
|
-
Dir.glob(File.dirname(__FILE__) + '/
|
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.
|
7
|
-
2
|
8
|
-
3
|
9
|
-
4
|
10
|
-
5
|
11
|
-
6
|
12
|
-
7
|
13
|
-
8
|
14
|
-
9
|
15
|
-
10
|
16
|
-
13
|
17
|
-
14
|
18
|
-
15
|
19
|
-
16
|
20
|
-
17
|
21
|
-
18
|
22
|
-
19
|
23
|
-
20
|
24
|
-
21
|
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
|
31
|
-
2
|
32
|
-
3
|
33
|
-
4
|
34
|
-
5
|
35
|
-
6
|
36
|
-
7
|
37
|
-
8
|
38
|
-
9
|
39
|
-
10
|
40
|
-
13
|
41
|
-
14
|
42
|
-
15
|
43
|
-
16
|
44
|
-
17
|
45
|
-
18
|
46
|
-
19
|
47
|
-
20
|
48
|
-
21 0.
|
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
|
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.
|
6
|
-
1
|
7
|
-
2
|
8
|
-
3
|
9
|
-
4
|
10
|
-
5
|
11
|
-
6
|
12
|
-
7
|
13
|
-
8
|
14
|
-
9
|
15
|
-
12
|
16
|
-
13
|
17
|
-
14
|
18
|
-
15
|
19
|
-
16
|
20
|
-
17
|
21
|
-
18
|
22
|
-
19
|
23
|
-
20
|
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
|
29
|
-
1
|
30
|
-
2
|
31
|
-
3
|
32
|
-
4
|
33
|
-
5
|
34
|
-
6
|
35
|
-
7
|
36
|
-
8
|
37
|
-
9
|
38
|
-
12
|
39
|
-
13
|
40
|
-
14
|
41
|
-
15
|
42
|
-
16
|
43
|
-
17
|
44
|
-
18
|
45
|
-
19
|
46
|
-
20 0.
|
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
|
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.
|
7
|
-
1
|
8
|
-
2
|
9
|
-
3
|
10
|
-
4
|
11
|
-
5
|
12
|
-
6
|
13
|
-
7
|
14
|
-
8
|
15
|
-
9
|
16
|
-
12
|
17
|
-
13
|
18
|
-
14
|
19
|
-
15
|
20
|
-
16
|
21
|
-
17
|
22
|
-
18
|
23
|
-
19
|
24
|
-
20
|
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
|
31
|
-
1
|
32
|
-
2
|
33
|
-
3
|
34
|
-
4
|
35
|
-
5
|
36
|
-
6
|
37
|
-
7
|
38
|
-
8
|
39
|
-
9
|
40
|
-
12
|
41
|
-
13
|
42
|
-
14
|
43
|
-
15
|
44
|
-
16
|
45
|
-
17
|
46
|
-
18
|
47
|
-
19
|
48
|
-
20 0.
|
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
|
54
|
+
0 969.500 549.500 0.000
|
@@ -1,39 +1,39 @@
|
|
1
|
-
Parabolic1FromTopLeft 0 -1.
|
2
|
-
Parabolic1FromTopLeft 1 -0.
|
3
|
-
Parabolic1FromTopLeft 2 -0.
|
4
|
-
Parabolic1FromTopLeft 3 -0.
|
5
|
-
Parabolic1FromTopLeft 4 -0.
|
6
|
-
Parabolic1FromTopLeft 5 -0.
|
7
|
-
Parabolic1FromTopLeft 6 -0.
|
8
|
-
Parabolic1FromTopLeft 7 -0.
|
9
|
-
Parabolic1FromTopLeft 8 -0.
|
10
|
-
Parabolic1FromTopLeft 9 -0.
|
11
|
-
Parabolic1FromTopLeft 12 0.
|
12
|
-
Parabolic1FromTopLeft 13 0.
|
13
|
-
Parabolic1FromTopLeft 14 0.
|
14
|
-
Parabolic1FromTopLeft 15 0.
|
15
|
-
Parabolic1FromTopLeft 16 0.
|
16
|
-
Parabolic1FromTopLeft 17 0.
|
17
|
-
Parabolic1FromTopLeft 18 0.
|
18
|
-
Parabolic1FromTopLeft 19 0.
|
19
|
-
Parabolic1FromTopLeft 20 1.
|
20
|
-
Parabolic2FromBottomRight 0 1.
|
21
|
-
Parabolic2FromBottomRight 1 0.
|
22
|
-
Parabolic2FromBottomRight 2 0.
|
23
|
-
Parabolic2FromBottomRight 3 0.
|
24
|
-
Parabolic2FromBottomRight 4 0.
|
25
|
-
Parabolic2FromBottomRight 5 0.
|
26
|
-
Parabolic2FromBottomRight 6 0.
|
27
|
-
Parabolic2FromBottomRight 7 0.
|
28
|
-
Parabolic2FromBottomRight 8 0.
|
29
|
-
Parabolic2FromBottomRight 9 0.
|
30
|
-
Parabolic2FromBottomRight 12 -0.
|
31
|
-
Parabolic2FromBottomRight 13 -0.
|
32
|
-
Parabolic2FromBottomRight 14 -0.
|
33
|
-
Parabolic2FromBottomRight 15 -0.
|
34
|
-
Parabolic2FromBottomRight 16 -0.
|
35
|
-
Parabolic2FromBottomRight 17 -0.
|
36
|
-
Parabolic2FromBottomRight 18 -0.
|
37
|
-
Parabolic2FromBottomRight 19 -0.
|
38
|
-
Parabolic2FromBottomRight 20 -1.
|
39
|
-
SingleFrameInTheMiddle 0 0.
|
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
|
42
|
-
assert_in_delta 30.
|
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.
|
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.
|
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
|
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
|
|