tracksperanto 1.7.3 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +7 -0
- data/Manifest.txt +2 -0
- data/bin/tracksperanto +9 -4
- data/lib/export/syntheyes.rb +29 -3
- data/lib/middleware/length_cutoff.rb +24 -0
- data/lib/pipeline/base.rb +2 -1
- data/lib/tracksperanto.rb +1 -1
- data/test/export/samples/ref_Mayalive.txt +0 -4
- data/test/export/samples/ref_Mayalive_CustomAspect.txt +0 -4
- data/test/export/samples/ref_NukeScript.nk +2 -2
- data/test/export/samples/ref_PFTrack.2dt +2 -6
- data/test/export/samples/ref_PFTrack5.2dt +2 -6
- data/test/export/samples/ref_ShakeText.txt +0 -4
- data/test/export/samples/ref_Syntheyes.txt +36 -40
- data/test/export/samples/ref_equalizer.txt +2 -6
- data/test/export/samples/ref_equalizer3.txt +0 -4
- data/test/export/samples/ref_matchmover.rz2 +0 -4
- data/test/export/test_pftrack5_export.rb +1 -1
- data/test/helper.rb +7 -2
- data/test/import/test_pftrack_import.rb +3 -1
- data/test/middleware/test_length_cutoff_middleware.rb +38 -0
- metadata +5 -2
data/History.txt
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
=== 1.7.4 / 2010-02-02
|
2
|
+
|
3
|
+
* Introduce an intentional gap in the reference exports to test trackers with gaps
|
4
|
+
* Export Syntheyes paths as normal frames, not as keyframes. This produces better solves by not overconstraining the solver
|
5
|
+
(Without this TransitionFrms, a crucial parameter in SY, seizes to work)
|
6
|
+
* Add a LengthCutoff middleware that allows you to remove trackers that have less than X keyframes in them from the export
|
7
|
+
|
1
8
|
=== 1.7.3 / 2010-02-02
|
2
9
|
|
3
10
|
* Fixed the --only option in the commandline binary
|
data/Manifest.txt
CHANGED
@@ -31,6 +31,7 @@ lib/import/shake_text.rb
|
|
31
31
|
lib/import/syntheyes.rb
|
32
32
|
lib/middleware/base.rb
|
33
33
|
lib/middleware/golden.rb
|
34
|
+
lib/middleware/length_cutoff.rb
|
34
35
|
lib/middleware/lerp.rb
|
35
36
|
lib/middleware/prefix.rb
|
36
37
|
lib/middleware/reformat.rb
|
@@ -117,6 +118,7 @@ test/import/test_shake_script_import.rb
|
|
117
118
|
test/import/test_shake_text_import.rb
|
118
119
|
test/import/test_syntheyes_import.rb
|
119
120
|
test/middleware/test_golden_middleware.rb
|
121
|
+
test/middleware/test_length_cutoff_middleware.rb
|
120
122
|
test/middleware/test_lerp_middleware.rb
|
121
123
|
test/middleware/test_prefix.rb
|
122
124
|
test/middleware/test_reformat_middleware.rb
|
data/bin/tracksperanto
CHANGED
@@ -25,6 +25,7 @@ slip = 0
|
|
25
25
|
golden_tracks = false
|
26
26
|
x_shift = 0
|
27
27
|
y_shift = 0
|
28
|
+
length_gate = 0
|
28
29
|
set_prefix = ''
|
29
30
|
sole_format = nil
|
30
31
|
lerp = false
|
@@ -51,13 +52,16 @@ parser = OptionParser.new do | p |
|
|
51
52
|
golden_tracks = g_flag
|
52
53
|
}
|
53
54
|
p.on(" -rx", "--reformat-x NEW_PIX_WIDTH", Integer, "Reformat the comp to this width and scale all tracks to it") {|rw|
|
54
|
-
|
55
|
+
reformat_w = rw
|
55
56
|
}
|
56
57
|
p.on(" -ry", "--reformat-y NEW_PIX_HEIGHT", Integer, "Reformat the comp to this height and scale all tracks to it") {|rh|
|
57
|
-
|
58
|
+
reformat_h = rh
|
58
59
|
}
|
59
60
|
p.on(" -o", "--only EXPORTER_NAME", String, "Only export the selected format, format must be one of #{writers.join(", ")}") {|f|
|
60
|
-
|
61
|
+
sole_format = f
|
62
|
+
}
|
63
|
+
p.on(" -m", "--min-length LENGTH_IN_FRAMES", Integer, "Only export trackers having more than X keyframes") {|f|
|
64
|
+
length_gate = f
|
61
65
|
}
|
62
66
|
p.on(" -xm", "--xshift X_IN_PIXELS", Float, "Move the points left or right") {|sx| x_shift = sx }
|
63
67
|
p.on(" -ym", "--yshift Y_IN_PIXELS", Float, "Move the points up or down") {|sx| y_shift = sx }
|
@@ -120,7 +124,7 @@ if sole_format
|
|
120
124
|
end
|
121
125
|
end
|
122
126
|
|
123
|
-
pipe.run(input_file, :pix_w => width, :pix_h => height, :parser => reader_klass) do | scaler, slipper, golden, reformat, shift, prefix, lerpm |
|
127
|
+
pipe.run(input_file, :pix_w => width, :pix_h => height, :parser => reader_klass) do | scaler, slipper, golden, reformat, shift, prefix, lerpm, len |
|
124
128
|
slipper.slip = slip
|
125
129
|
scaler.x_factor = scale_x
|
126
130
|
scaler.y_factor = scale_y
|
@@ -131,5 +135,6 @@ pipe.run(input_file, :pix_w => width, :pix_h => height, :parser => reader_klass)
|
|
131
135
|
shift.y_shift = y_shift
|
132
136
|
prefix.prefix = set_prefix
|
133
137
|
lerpm.enabled = lerp
|
138
|
+
len.min_length = length_gate
|
134
139
|
end
|
135
140
|
STDOUT.puts("\rConverted #{pipe.converted_points} trackers with #{pipe.converted_keyframes} keys")
|
data/lib/export/syntheyes.rb
CHANGED
@@ -1,7 +1,17 @@
|
|
1
|
-
# Export for Syntheyes tracker UVs
|
1
|
+
# Export for Syntheyes tracker UVs. We actually just use prebaked sample values, and do not use bitmasks such as
|
2
|
+
# OUTCOME_RUN = 1
|
3
|
+
# OUTCOME_ENABLE = 2 -- mirrors the enable track
|
4
|
+
# OUTCOME_OK = 4 -- usable u/v present on this frame
|
5
|
+
# OUTCOME_KEY = 8 -- there is a key here (OK will be on too)
|
6
|
+
# OUTCOME_JUMPED = 16
|
7
|
+
# OUTCOME_OUTASIGHT = 32
|
2
8
|
class Tracksperanto::Export::SynthEyes < Tracksperanto::Export::Base
|
3
9
|
include Tracksperanto::UVCoordinates
|
4
10
|
|
11
|
+
STATUS_KF = 30
|
12
|
+
STATUS_STD = 7
|
13
|
+
STATUS_REENABLE = 15
|
14
|
+
|
5
15
|
def self.desc_and_extension
|
6
16
|
"syntheyes_2dt.txt"
|
7
17
|
end
|
@@ -15,11 +25,27 @@ class Tracksperanto::Export::SynthEyes < Tracksperanto::Export::Base
|
|
15
25
|
end
|
16
26
|
|
17
27
|
def start_tracker_segment(tracker_name)
|
18
|
-
@tracker_name = tracker_name
|
28
|
+
@last_f, @tracker_name = nil, tracker_name
|
19
29
|
end
|
20
30
|
|
21
31
|
def export_point(frame, abs_float_x, abs_float_y, float_residual)
|
22
32
|
values = [@tracker_name, frame] + absolute_to_uv(abs_float_x, abs_float_y, @width, @height)
|
23
|
-
|
33
|
+
values << get_outcome_code(frame)
|
34
|
+
@io.puts("%s %d %.6f %.6f %d" % values)
|
24
35
|
end
|
36
|
+
|
37
|
+
private
|
38
|
+
# It's very important that we provide an outcome code for Syntheyes. Regular keyframes get
|
39
|
+
# STATUS_STD, and after a gap we have to signal STATUS_REENABLE, otherwise this might bust solves
|
40
|
+
def get_outcome_code(frame)
|
41
|
+
outcome = if @last_f.nil?
|
42
|
+
STATUS_KF
|
43
|
+
elsif @last_f && (@last_f != frame -1)
|
44
|
+
STATUS_REENABLE
|
45
|
+
else
|
46
|
+
STATUS_STD
|
47
|
+
end
|
48
|
+
@last_f = frame
|
49
|
+
outcome
|
50
|
+
end
|
25
51
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# This middleware removes trackers that contain less than min_length keyframes
|
2
|
+
# from the exported batch
|
3
|
+
class Tracksperanto::Middleware::LengthCutoff < Tracksperanto::Middleware::Base
|
4
|
+
attr_accessor :min_length
|
5
|
+
cast_to_int :min_length
|
6
|
+
|
7
|
+
def start_tracker_segment(name)
|
8
|
+
@tracker = Tracksperanto::Tracker.new(:name => name)
|
9
|
+
end
|
10
|
+
|
11
|
+
def end_tracker_segment
|
12
|
+
return if ((min_length > 0) && (@tracker.length < min_length))
|
13
|
+
|
14
|
+
@exporter.start_tracker_segment(@tracker.name)
|
15
|
+
@tracker.each{|kf| @exporter.export_point(kf.frame, kf.abs_x, kf.abs_y, kf.residual) }
|
16
|
+
@exporter.end_tracker_segment
|
17
|
+
end
|
18
|
+
|
19
|
+
def export_point(frame, float_x, float_y, float_residual)
|
20
|
+
@tracker.keyframe! :abs_x => float_x, :abs_y => float_y, :residual => float_residual, :frame => frame
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
end
|
data/lib/pipeline/base.rb
CHANGED
@@ -149,7 +149,8 @@ class Tracksperanto::Pipeline::Base
|
|
149
149
|
shift = Tracksperanto::Middleware::Shift.new(reformat)
|
150
150
|
prefix = Tracksperanto::Middleware::Prefix.new(shift)
|
151
151
|
lerp = Tracksperanto::Middleware::Lerp.new(prefix)
|
152
|
-
|
152
|
+
lengate = Tracksperanto::Middleware::LengthCutoff.new(lerp)
|
153
|
+
[scaler, slipper, golden, reformat, shift, prefix, lerp, lengate]
|
153
154
|
end
|
154
155
|
|
155
156
|
# Open the file for writing and register it to be closed automatically
|
data/lib/tracksperanto.rb
CHANGED
@@ -10,8 +10,6 @@
|
|
10
10
|
0 7 -0.5333333333 -0.8200000000 0.0333333333
|
11
11
|
0 8 -0.3555555556 -0.9200000000 0.0380952381
|
12
12
|
0 9 -0.1777777778 -0.9800000000 0.0428571429
|
13
|
-
0 10 0.0000000000 -1.0000000000 0.0476190476
|
14
|
-
0 11 0.1777777778 -0.9800000000 0.0523809524
|
15
13
|
0 12 0.3555555556 -0.9200000000 0.0571428571
|
16
14
|
0 13 0.5333333333 -0.8200000000 0.0619047619
|
17
15
|
0 14 0.7111111111 -0.6800000000 0.0666666667
|
@@ -32,8 +30,6 @@
|
|
32
30
|
1 7 0.5333333333 0.8200000000 0.0333333333
|
33
31
|
1 8 0.3555555556 0.9200000000 0.0380952381
|
34
32
|
1 9 0.1777777778 0.9800000000 0.0428571429
|
35
|
-
1 10 0.0000000000 1.0000000000 0.0476190476
|
36
|
-
1 11 -0.1777777778 0.9800000000 0.0523809524
|
37
33
|
1 12 -0.3555555556 0.9200000000 0.0571428571
|
38
34
|
1 13 -0.5333333333 0.8200000000 0.0619047619
|
39
35
|
1 14 -0.7111111111 0.6800000000 0.0666666667
|
@@ -10,8 +10,6 @@
|
|
10
10
|
0 7 -0.5340000000 -0.8200000000 0.0333333333
|
11
11
|
0 8 -0.3560000000 -0.9200000000 0.0380952381
|
12
12
|
0 9 -0.1780000000 -0.9800000000 0.0428571429
|
13
|
-
0 10 -0.0000000000 -1.0000000000 0.0476190476
|
14
|
-
0 11 0.1780000000 -0.9800000000 0.0523809524
|
15
13
|
0 12 0.3560000000 -0.9200000000 0.0571428571
|
16
14
|
0 13 0.5340000000 -0.8200000000 0.0619047619
|
17
15
|
0 14 0.7120000000 -0.6800000000 0.0666666667
|
@@ -32,8 +30,6 @@
|
|
32
30
|
1 7 0.5340000000 0.8200000000 0.0333333333
|
33
31
|
1 8 0.3560000000 0.9200000000 0.0380952381
|
34
32
|
1 9 0.1780000000 0.9800000000 0.0428571429
|
35
|
-
1 10 -0.0000000000 1.0000000000 0.0476190476
|
36
|
-
1 11 -0.1780000000 0.9800000000 0.0523809524
|
37
33
|
1 12 -0.3560000000 0.9200000000 0.0571428571
|
38
34
|
1 13 -0.5340000000 0.8200000000 0.0619047619
|
39
35
|
1 14 -0.7120000000 0.6800000000 0.0666666667
|
@@ -16,14 +16,14 @@ Constant {
|
|
16
16
|
}
|
17
17
|
|
18
18
|
Tracker3 {
|
19
|
-
track1 {{curve i x1 0.0000 x2 96.0000 192.0000 288.0000 384.0000 480.0000 576.0000 672.0000 768.0000 864.0000
|
19
|
+
track1 {{curve i x1 0.0000 x2 96.0000 192.0000 288.0000 384.0000 480.0000 576.0000 672.0000 768.0000 864.0000 x13 1152.0000 x14 1248.0000 1344.0000 1440.0000 1536.0000 1632.0000 1728.0000 1824.0000 1920.0000} {curve i x1 1080.0000 x2 874.8000 691.2000 529.2000 388.8000 270.0000 172.8000 97.2000 43.2000 10.8000 x13 43.2000 x14 97.2000 172.8000 270.0000 388.8000 529.2000 691.2000 874.8000 1080.0000}}
|
20
20
|
name Parabolic_1_from_top_left
|
21
21
|
xpos 0
|
22
22
|
ypos 30
|
23
23
|
}
|
24
24
|
|
25
25
|
Tracker3 {
|
26
|
-
track1 {{curve i x1 1920.0000 x2 1824.0000 1728.0000 1632.0000 1536.0000 1440.0000 1344.0000 1248.0000 1152.0000 1056.0000
|
26
|
+
track1 {{curve i x1 1920.0000 x2 1824.0000 1728.0000 1632.0000 1536.0000 1440.0000 1344.0000 1248.0000 1152.0000 1056.0000 x13 768.0000 x14 672.0000 576.0000 480.0000 384.0000 288.0000 192.0000 96.0000 0.0000} {curve i x1 0.0000 x2 205.2000 388.8000 550.8000 691.2000 810.0000 907.2000 982.8000 1036.8000 1069.2000 x13 1036.8000 x14 982.8000 907.2000 810.0000 691.2000 550.8000 388.8000 205.2000 0.0000}}
|
27
27
|
name Parabolic_2_from_bottom_right
|
28
28
|
xpos 0
|
29
29
|
ypos 60
|
@@ -1,7 +1,7 @@
|
|
1
1
|
|
2
2
|
|
3
3
|
"Parabolic_1_from_top_left"
|
4
|
-
|
4
|
+
19
|
5
5
|
0 0.000 1080.000 0.000
|
6
6
|
1 96.000 874.800 0.006
|
7
7
|
2 192.000 691.200 0.012
|
@@ -12,8 +12,6 @@
|
|
12
12
|
7 672.000 97.200 0.042
|
13
13
|
8 768.000 43.200 0.048
|
14
14
|
9 864.000 10.800 0.054
|
15
|
-
10 960.000 0.000 0.060
|
16
|
-
11 1056.000 10.800 0.065
|
17
15
|
12 1152.000 43.200 0.071
|
18
16
|
13 1248.000 97.200 0.077
|
19
17
|
14 1344.000 172.800 0.083
|
@@ -26,7 +24,7 @@
|
|
26
24
|
|
27
25
|
|
28
26
|
"Parabolic_2_from_bottom_right"
|
29
|
-
|
27
|
+
19
|
30
28
|
0 1920.000 0.000 0.000
|
31
29
|
1 1824.000 205.200 0.006
|
32
30
|
2 1728.000 388.800 0.012
|
@@ -37,8 +35,6 @@
|
|
37
35
|
7 1248.000 982.800 0.042
|
38
36
|
8 1152.000 1036.800 0.048
|
39
37
|
9 1056.000 1069.200 0.054
|
40
|
-
10 960.000 1080.000 0.060
|
41
|
-
11 864.000 1069.200 0.065
|
42
38
|
12 768.000 1036.800 0.071
|
43
39
|
13 672.000 982.800 0.077
|
44
40
|
14 576.000 907.200 0.083
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
"Parabolic_1_from_top_left"
|
4
4
|
"Primary"
|
5
|
-
|
5
|
+
19
|
6
6
|
0 0.000 1080.000 0.000
|
7
7
|
1 96.000 874.800 0.006
|
8
8
|
2 192.000 691.200 0.012
|
@@ -13,8 +13,6 @@
|
|
13
13
|
7 672.000 97.200 0.042
|
14
14
|
8 768.000 43.200 0.048
|
15
15
|
9 864.000 10.800 0.054
|
16
|
-
10 960.000 0.000 0.060
|
17
|
-
11 1056.000 10.800 0.065
|
18
16
|
12 1152.000 43.200 0.071
|
19
17
|
13 1248.000 97.200 0.077
|
20
18
|
14 1344.000 172.800 0.083
|
@@ -28,7 +26,7 @@
|
|
28
26
|
|
29
27
|
"Parabolic_2_from_bottom_right"
|
30
28
|
"Primary"
|
31
|
-
|
29
|
+
19
|
32
30
|
0 1920.000 0.000 0.000
|
33
31
|
1 1824.000 205.200 0.006
|
34
32
|
2 1728.000 388.800 0.012
|
@@ -39,8 +37,6 @@
|
|
39
37
|
7 1248.000 982.800 0.042
|
40
38
|
8 1152.000 1036.800 0.048
|
41
39
|
9 1056.000 1069.200 0.054
|
42
|
-
10 960.000 1080.000 0.060
|
43
|
-
11 864.000 1069.200 0.065
|
44
40
|
12 768.000 1036.800 0.071
|
45
41
|
13 672.000 982.800 0.077
|
46
42
|
14 576.000 907.200 0.083
|
@@ -10,8 +10,6 @@ TrackName Parabolic_1_from_top_left
|
|
10
10
|
8.00 672.000 97.200 0.667
|
11
11
|
9.00 768.000 43.200 0.619
|
12
12
|
10.00 864.000 10.800 0.571
|
13
|
-
11.00 960.000 0.000 0.524
|
14
|
-
12.00 1056.000 10.800 0.476
|
15
13
|
13.00 1152.000 43.200 0.429
|
16
14
|
14.00 1248.000 97.200 0.381
|
17
15
|
15.00 1344.000 172.800 0.333
|
@@ -34,8 +32,6 @@ TrackName Parabolic_2_from_bottom_right
|
|
34
32
|
8.00 1248.000 982.800 0.667
|
35
33
|
9.00 1152.000 1036.800 0.619
|
36
34
|
10.00 1056.000 1069.200 0.571
|
37
|
-
11.00 960.000 1080.000 0.524
|
38
|
-
12.00 864.000 1069.200 0.476
|
39
35
|
13.00 768.000 1036.800 0.429
|
40
36
|
14.00 672.000 982.800 0.381
|
41
37
|
15.00 576.000 907.200 0.333
|
@@ -1,42 +1,38 @@
|
|
1
1
|
Parabolic_1_from_top_left 0 -1.000000 -1.000000 30
|
2
|
-
Parabolic_1_from_top_left 1 -0.900000 -0.620000
|
3
|
-
Parabolic_1_from_top_left 2 -0.800000 -0.280000
|
4
|
-
Parabolic_1_from_top_left 3 -0.700000 0.020000
|
5
|
-
Parabolic_1_from_top_left 4 -0.600000 0.280000
|
6
|
-
Parabolic_1_from_top_left 5 -0.500000 0.500000
|
7
|
-
Parabolic_1_from_top_left 6 -0.400000 0.680000
|
8
|
-
Parabolic_1_from_top_left 7 -0.300000 0.820000
|
9
|
-
Parabolic_1_from_top_left 8 -0.200000 0.920000
|
10
|
-
Parabolic_1_from_top_left 9 -0.100000 0.980000
|
11
|
-
Parabolic_1_from_top_left
|
12
|
-
Parabolic_1_from_top_left
|
13
|
-
Parabolic_1_from_top_left
|
14
|
-
Parabolic_1_from_top_left
|
15
|
-
Parabolic_1_from_top_left
|
16
|
-
Parabolic_1_from_top_left
|
17
|
-
Parabolic_1_from_top_left
|
18
|
-
Parabolic_1_from_top_left
|
19
|
-
Parabolic_1_from_top_left
|
20
|
-
Parabolic_1_from_top_left 19 0.900000 -0.620000 30
|
21
|
-
Parabolic_1_from_top_left 20 1.000000 -1.000000 30
|
2
|
+
Parabolic_1_from_top_left 1 -0.900000 -0.620000 7
|
3
|
+
Parabolic_1_from_top_left 2 -0.800000 -0.280000 7
|
4
|
+
Parabolic_1_from_top_left 3 -0.700000 0.020000 7
|
5
|
+
Parabolic_1_from_top_left 4 -0.600000 0.280000 7
|
6
|
+
Parabolic_1_from_top_left 5 -0.500000 0.500000 7
|
7
|
+
Parabolic_1_from_top_left 6 -0.400000 0.680000 7
|
8
|
+
Parabolic_1_from_top_left 7 -0.300000 0.820000 7
|
9
|
+
Parabolic_1_from_top_left 8 -0.200000 0.920000 7
|
10
|
+
Parabolic_1_from_top_left 9 -0.100000 0.980000 7
|
11
|
+
Parabolic_1_from_top_left 12 0.200000 0.920000 15
|
12
|
+
Parabolic_1_from_top_left 13 0.300000 0.820000 7
|
13
|
+
Parabolic_1_from_top_left 14 0.400000 0.680000 7
|
14
|
+
Parabolic_1_from_top_left 15 0.500000 0.500000 7
|
15
|
+
Parabolic_1_from_top_left 16 0.600000 0.280000 7
|
16
|
+
Parabolic_1_from_top_left 17 0.700000 0.020000 7
|
17
|
+
Parabolic_1_from_top_left 18 0.800000 -0.280000 7
|
18
|
+
Parabolic_1_from_top_left 19 0.900000 -0.620000 7
|
19
|
+
Parabolic_1_from_top_left 20 1.000000 -1.000000 7
|
22
20
|
Parabolic_2_from_bottom_right 0 1.000000 1.000000 30
|
23
|
-
Parabolic_2_from_bottom_right 1 0.900000 0.620000
|
24
|
-
Parabolic_2_from_bottom_right 2 0.800000 0.280000
|
25
|
-
Parabolic_2_from_bottom_right 3 0.700000 -0.020000
|
26
|
-
Parabolic_2_from_bottom_right 4 0.600000 -0.280000
|
27
|
-
Parabolic_2_from_bottom_right 5 0.500000 -0.500000
|
28
|
-
Parabolic_2_from_bottom_right 6 0.400000 -0.680000
|
29
|
-
Parabolic_2_from_bottom_right 7 0.300000 -0.820000
|
30
|
-
Parabolic_2_from_bottom_right 8 0.200000 -0.920000
|
31
|
-
Parabolic_2_from_bottom_right 9 0.100000 -0.980000
|
32
|
-
Parabolic_2_from_bottom_right
|
33
|
-
Parabolic_2_from_bottom_right
|
34
|
-
Parabolic_2_from_bottom_right
|
35
|
-
Parabolic_2_from_bottom_right
|
36
|
-
Parabolic_2_from_bottom_right
|
37
|
-
Parabolic_2_from_bottom_right
|
38
|
-
Parabolic_2_from_bottom_right
|
39
|
-
Parabolic_2_from_bottom_right
|
40
|
-
Parabolic_2_from_bottom_right
|
41
|
-
Parabolic_2_from_bottom_right 19 -0.900000 0.620000 30
|
42
|
-
Parabolic_2_from_bottom_right 20 -1.000000 1.000000 30
|
21
|
+
Parabolic_2_from_bottom_right 1 0.900000 0.620000 7
|
22
|
+
Parabolic_2_from_bottom_right 2 0.800000 0.280000 7
|
23
|
+
Parabolic_2_from_bottom_right 3 0.700000 -0.020000 7
|
24
|
+
Parabolic_2_from_bottom_right 4 0.600000 -0.280000 7
|
25
|
+
Parabolic_2_from_bottom_right 5 0.500000 -0.500000 7
|
26
|
+
Parabolic_2_from_bottom_right 6 0.400000 -0.680000 7
|
27
|
+
Parabolic_2_from_bottom_right 7 0.300000 -0.820000 7
|
28
|
+
Parabolic_2_from_bottom_right 8 0.200000 -0.920000 7
|
29
|
+
Parabolic_2_from_bottom_right 9 0.100000 -0.980000 7
|
30
|
+
Parabolic_2_from_bottom_right 12 -0.200000 -0.920000 15
|
31
|
+
Parabolic_2_from_bottom_right 13 -0.300000 -0.820000 7
|
32
|
+
Parabolic_2_from_bottom_right 14 -0.400000 -0.680000 7
|
33
|
+
Parabolic_2_from_bottom_right 15 -0.500000 -0.500000 7
|
34
|
+
Parabolic_2_from_bottom_right 16 -0.600000 -0.280000 7
|
35
|
+
Parabolic_2_from_bottom_right 17 -0.700000 -0.020000 7
|
36
|
+
Parabolic_2_from_bottom_right 18 -0.800000 0.280000 7
|
37
|
+
Parabolic_2_from_bottom_right 19 -0.900000 0.620000 7
|
38
|
+
Parabolic_2_from_bottom_right 20 -1.000000 1.000000 7
|
@@ -1,7 +1,7 @@
|
|
1
1
|
2
|
2
2
|
Parabolic_1_from_top_left
|
3
3
|
0
|
4
|
-
|
4
|
+
19
|
5
5
|
1 0.000000000000000 1080.000000000000000
|
6
6
|
2 95.999999999999972 874.800000000000068
|
7
7
|
3 191.999999999999943 691.200000000000159
|
@@ -12,8 +12,6 @@ Parabolic_1_from_top_left
|
|
12
12
|
8 672.000000000000000 97.200000000000003
|
13
13
|
9 768.000000000000000 43.200000000000010
|
14
14
|
10 864.000000000000000 10.800000000000002
|
15
|
-
11 960.000000000000000 0.000000000000000
|
16
|
-
12 1056.000000000000000 10.800000000000002
|
17
15
|
13 1152.000000000000000 43.200000000000010
|
18
16
|
14 1248.000000000000000 97.200000000000003
|
19
17
|
15 1344.000000000000000 172.800000000000040
|
@@ -25,7 +23,7 @@ Parabolic_1_from_top_left
|
|
25
23
|
21 1920.000000000000000 1080.000000000000000
|
26
24
|
Parabolic_2_from_bottom_right
|
27
25
|
0
|
28
|
-
|
26
|
+
19
|
29
27
|
1 1920.000000000000000 0.000000000000000
|
30
28
|
2 1824.000000000000000 205.199999999999932
|
31
29
|
3 1728.000000000000000 388.799999999999841
|
@@ -36,8 +34,6 @@ Parabolic_2_from_bottom_right
|
|
36
34
|
8 1248.000000000000000 982.800000000000068
|
37
35
|
9 1152.000000000000000 1036.799999999999955
|
38
36
|
10 1056.000000000000000 1069.200000000000045
|
39
|
-
11 960.000000000000000 1080.000000000000000
|
40
|
-
12 864.000000000000000 1069.200000000000045
|
41
37
|
13 768.000000000000000 1036.799999999999955
|
42
38
|
14 672.000000000000000 982.800000000000068
|
43
39
|
15 576.000000000000000 907.199999999999932
|
@@ -10,8 +10,6 @@ Parabolic_1_from_top_left
|
|
10
10
|
8 672.000 97.200
|
11
11
|
9 768.000 43.200
|
12
12
|
10 864.000 10.800
|
13
|
-
11 960.000 0.000
|
14
|
-
12 1056.000 10.800
|
15
13
|
13 1152.000 43.200
|
16
14
|
14 1248.000 97.200
|
17
15
|
15 1344.000 172.800
|
@@ -32,8 +30,6 @@ Parabolic_2_from_bottom_right
|
|
32
30
|
8 1248.000 982.800
|
33
31
|
9 1152.000 1036.800
|
34
32
|
10 1056.000 1069.200
|
35
|
-
11 960.000 1080.000
|
36
|
-
12 864.000 1069.200
|
37
33
|
13 768.000 1036.800
|
38
34
|
14 672.000 982.800
|
39
35
|
15 576.000 907.200
|
@@ -14,8 +14,6 @@ pointTrack "Parabolic_1_from_top_left" rgb( 255 0 0 )
|
|
14
14
|
8 672.000 982.800 p+( 0.666667 )
|
15
15
|
9 768.000 1036.800 p+( 0.619048 )
|
16
16
|
10 864.000 1069.200 p+( 0.571429 )
|
17
|
-
11 960.000 1080.000 p+( 0.523810 )
|
18
|
-
12 1056.000 1069.200 p+( 0.476190 )
|
19
17
|
13 1152.000 1036.800 p+( 0.428571 )
|
20
18
|
14 1248.000 982.800 p+( 0.380952 )
|
21
19
|
15 1344.000 907.200 p+( 0.333333 )
|
@@ -38,8 +36,6 @@ pointTrack "Parabolic_2_from_bottom_right" rgb( 255 0 0 )
|
|
38
36
|
8 1248.000 97.200 p+( 0.666667 )
|
39
37
|
9 1152.000 43.200 p+( 0.619048 )
|
40
38
|
10 1056.000 10.800 p+( 0.571429 )
|
41
|
-
11 960.000 0.000 p+( 0.523810 )
|
42
|
-
12 864.000 10.800 p+( 0.476190 )
|
43
39
|
13 768.000 43.200 p+( 0.428571 )
|
44
40
|
14 672.000 97.200 p+( 0.380952 )
|
45
41
|
15 576.000 172.800 p+( 0.333333 )
|
@@ -14,6 +14,6 @@ class PFTrack5ExportTest < Test::Unit::TestCase
|
|
14
14
|
P = File.dirname(__FILE__) + "/samples/ref_PFTrack5.2dt"
|
15
15
|
|
16
16
|
def test_export_output_written
|
17
|
-
|
17
|
+
ensure_same_output Tracksperanto::Export::PFTrack5, P
|
18
18
|
end
|
19
19
|
end
|
data/test/helper.rb
CHANGED
@@ -45,17 +45,22 @@ module ParabolicTracks
|
|
45
45
|
|
46
46
|
residual_unit = 1.0 / x_uv_chain.length
|
47
47
|
|
48
|
+
SKIPS = [10,11]
|
48
49
|
FIRST_TRACK = Tracksperanto::Tracker.new(:name => "Parabolic_1_from_top_left") do | t |
|
49
50
|
tuples_for_tracker_1.each do | (f, x, y )|
|
50
51
|
ax, ay = uv_to_abs(x, y, 1920, 1080)
|
51
|
-
|
52
|
+
unless SKIPS.include?(f)
|
53
|
+
t.keyframe!(:frame => f, :abs_x => ax, :abs_y => ay, :residual => (f * residual_unit))
|
54
|
+
end
|
52
55
|
end
|
53
56
|
end
|
54
57
|
|
55
58
|
SECOND_TRACK = Tracksperanto::Tracker.new(:name => "Parabolic_2_from_bottom_right") do | t |
|
56
59
|
tuples_for_tracker_2.each do | (f, x, y )|
|
57
60
|
ax, ay = uv_to_abs(x, y, 1920, 1080)
|
58
|
-
|
61
|
+
unless SKIPS.include?(f)
|
62
|
+
t.keyframe!(:frame => f, :abs_x => ax, :abs_y => ay, :residual => (f * residual_unit))
|
63
|
+
end
|
59
64
|
end
|
60
65
|
end
|
61
66
|
|
@@ -10,8 +10,9 @@ class PFTrackImportTest < Test::Unit::TestCase
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def test_parsing_from_importable_pftrack_4
|
13
|
+
|
13
14
|
fixture = File.open(File.dirname(__FILE__) + '/samples/pftrack4/sourcefile_pftrack.2dt')
|
14
|
-
|
15
|
+
|
15
16
|
parser = Tracksperanto::Import::PFTrack.new
|
16
17
|
parser.width = 2560
|
17
18
|
parser.height = 1080
|
@@ -45,4 +46,5 @@ class PFTrackImportTest < Test::Unit::TestCase
|
|
45
46
|
assert_equal "Tracker121", trackers[0].name
|
46
47
|
assert_equal 189, trackers[0].length
|
47
48
|
end
|
49
|
+
|
48
50
|
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../helper'
|
2
|
+
|
3
|
+
class LengthCutoffMiddlewareTest < Test::Unit::TestCase
|
4
|
+
def test_default_length_set_to_zero_and_ignored
|
5
|
+
receiver = flexmock
|
6
|
+
m = Tracksperanto::Middleware::LengthCutoff.new(receiver)
|
7
|
+
assert_equal 0, m.min_length
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_slip_supports_hash_init
|
11
|
+
receiver = flexmock
|
12
|
+
m = Tracksperanto::Middleware::LengthCutoff.new(receiver, :min_length => 23)
|
13
|
+
assert_equal 23, m.min_length
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_slipper_bypasses_methods
|
17
|
+
receiver = flexmock
|
18
|
+
receiver.should_receive(:start_export).once.with(120,120)
|
19
|
+
receiver.should_receive(:start_tracker_segment).once.with("Tracker")
|
20
|
+
12.times do | i |
|
21
|
+
receiver.should_receive(:export_point).with(i, 100, 100, 0)
|
22
|
+
end
|
23
|
+
receiver.should_receive(:end_tracker_segment).once
|
24
|
+
receiver.should_receive(:end_export).once
|
25
|
+
|
26
|
+
|
27
|
+
m = Tracksperanto::Middleware::LengthCutoff.new(receiver, :min_length => 12)
|
28
|
+
m.start_export(120, 120)
|
29
|
+
m.start_tracker_segment("Tracker")
|
30
|
+
12.times {|t| m.export_point(t, 100, 100, 0) }
|
31
|
+
m.end_tracker_segment
|
32
|
+
m.start_tracker_segment("Tracker2")
|
33
|
+
11.times {|t| m.export_point(t, 100, 100, 0) }
|
34
|
+
m.end_tracker_segment
|
35
|
+
m.end_export
|
36
|
+
|
37
|
+
end
|
38
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tracksperanto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julik Tarkhanov
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-02-
|
12
|
+
date: 2010-02-09 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -78,6 +78,7 @@ files:
|
|
78
78
|
- lib/import/syntheyes.rb
|
79
79
|
- lib/middleware/base.rb
|
80
80
|
- lib/middleware/golden.rb
|
81
|
+
- lib/middleware/length_cutoff.rb
|
81
82
|
- lib/middleware/lerp.rb
|
82
83
|
- lib/middleware/prefix.rb
|
83
84
|
- lib/middleware/reformat.rb
|
@@ -164,6 +165,7 @@ files:
|
|
164
165
|
- test/import/test_shake_text_import.rb
|
165
166
|
- test/import/test_syntheyes_import.rb
|
166
167
|
- test/middleware/test_golden_middleware.rb
|
168
|
+
- test/middleware/test_length_cutoff_middleware.rb
|
167
169
|
- test/middleware/test_lerp_middleware.rb
|
168
170
|
- test/middleware/test_prefix.rb
|
169
171
|
- test/middleware/test_reformat_middleware.rb
|
@@ -231,6 +233,7 @@ test_files:
|
|
231
233
|
- test/import/test_shake_text_import.rb
|
232
234
|
- test/import/test_syntheyes_import.rb
|
233
235
|
- test/middleware/test_golden_middleware.rb
|
236
|
+
- test/middleware/test_length_cutoff_middleware.rb
|
234
237
|
- test/middleware/test_lerp_middleware.rb
|
235
238
|
- test/middleware/test_prefix.rb
|
236
239
|
- test/middleware/test_reformat_middleware.rb
|