tracksperanto 4.1.2 → 4.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/tracksperanto/version.rb +1 -1
- data/test/HELP_WHY_TESTS_ARE_EMPTY.md +8 -0
- data/tracksperanto.gemspec +2 -4
- metadata +4 -179
- data/test/export/README_EXPORT_TESTS.txt +0 -24
- data/test/export/samples/ref_AfterEffects.jsx +0 -70
- data/test/export/samples/ref_FlameProperlyReorderedCornerpin.stabilizer +0 -1946
- data/test/export/samples/ref_FlameSimpleReorderedCornerpin.stabilizer +0 -1946
- data/test/export/samples/ref_Maxscript.ms +0 -93
- data/test/export/samples/ref_MayaLocators.ma +0 -90
- data/test/export/samples/ref_Mayalive.txt +0 -43
- data/test/export/samples/ref_Mayalive_CustomAspect.txt +0 -43
- data/test/export/samples/ref_NukeCameraTrackerUsertracks.txt +0 -48
- data/test/export/samples/ref_NukeScript.nk +0 -37
- data/test/export/samples/ref_PFMatchit.2dt +0 -54
- data/test/export/samples/ref_PFTrack.2dt +0 -51
- data/test/export/samples/ref_PFTrack5.2dt +0 -54
- data/test/export/samples/ref_Ruby.rb +0 -54
- data/test/export/samples/ref_ShakeText.txt +0 -48
- data/test/export/samples/ref_Syntheyes.txt +0 -39
- data/test/export/samples/ref_XSI.py +0 -102
- data/test/export/samples/ref_boujou.txt +0 -44
- data/test/export/samples/ref_equalizer.txt +0 -49
- data/test/export/samples/ref_equalizer3.txt +0 -44
- data/test/export/samples/ref_flame.stabilizer +0 -962
- data/test/export/samples/ref_flameCornerpin.stabilizer +0 -962
- data/test/export/samples/ref_flame_2014.stabilizer +0 -893
- data/test/export/samples/ref_flame_2014_cornerpin.stabilizer +0 -1422
- data/test/export/samples/ref_matchmover.rz2 +0 -52
- data/test/export/test_ae_export.rb +0 -16
- data/test/export/test_boujou_export.rb +0 -17
- data/test/export/test_equalizer3_export.rb +0 -24
- data/test/export/test_equalizer_export.rb +0 -15
- data/test/export/test_flame_stabilizer_2014_cornerpin_export.rb +0 -33
- data/test/export/test_flame_stabilizer_2014_export.rb +0 -17
- data/test/export/test_flame_stabilizer_cornerpin_export.rb +0 -71
- data/test/export/test_flame_stabilizer_export.rb +0 -17
- data/test/export/test_match_mover_export.rb +0 -25
- data/test/export/test_maxscript.rb +0 -16
- data/test/export/test_maya_live_export.rb +0 -17
- data/test/export/test_maya_locators_export.rb +0 -16
- data/test/export/test_mux.rb +0 -23
- data/test/export/test_nuke_camtracker_export.rb +0 -15
- data/test/export/test_nuke_export.rb +0 -45
- data/test/export/test_pfmatchit_export.rb +0 -16
- data/test/export/test_pftrack5_export.rb +0 -19
- data/test/export/test_pftrack_export.rb +0 -19
- data/test/export/test_ruby_export.rb +0 -15
- data/test/export/test_shake_export.rb +0 -15
- data/test/export/test_syntheyes_export.rb +0 -15
- data/test/export/test_xsi_python_export.rb +0 -16
- data/test/helper.rb +0 -153
- data/test/import/README.rdoc +0 -10
- data/test/import/samples/3de_v3/3de_export_v3.txt +0 -2203
- data/test/import/samples/3de_v4/3de_export_cube.txt +0 -726
- data/test/import/samples/3de_v4/FB1880_man_v05.txt +0 -2402
- data/test/import/samples/boujou_features_text/boujou_txt_export.txt +0 -2885
- data/test/import/samples/flame_stabilizer/FlameStab_Cornerpin_CorrectOrder.stabilizer +0 -2758
- data/test/import/samples/flame_stabilizer/FlameStab_Cornerpin_IncorrectOrder.stabilizer +0 -2758
- data/test/import/samples/flame_stabilizer/Flame_Stabilizer_2012.stabilizer +0 -6954
- data/test/import/samples/flame_stabilizer/cornerpin_2012.stabilizer +0 -20958
- data/test/import/samples/flame_stabilizer/flame2010_cornerpin.stabilizer +0 -10792
- data/test/import/samples/flame_stabilizer/flame_2012_another.stabilizer +0 -2290
- data/test/import/samples/flame_stabilizer/fromCombustion_fromMidClip_wSnap.stabilizer +0 -2028
- data/test/import/samples/flame_stabilizer/fromTracksperanto.stabilizer +0 -541
- data/test/import/samples/flame_stabilizer/hugeFlameSetup.stabilizer +0 -263460
- data/test/import/samples/flame_stabilizer/megaTrack.action.3dtrack.stabilizer +0 -29793
- data/test/import/samples/flame_stabilizer/stabilizer_2014_ref_for_reexport.stabilizer +0 -2776
- data/test/import/samples/flame_stabilizer/stabilizer_2014_stp.stabilizer +0 -2536
- data/test/import/samples/match_mover/2dtracks.rz2 +0 -2076
- data/test/import/samples/match_mover/EP_1000_head_trackers_v002.rz2 +0 -935
- data/test/import/samples/match_mover/NonSequentialMatchmoverPoints.rz2 +0 -93306
- data/test/import/samples/match_mover/cha_171_1020_atb_v001.rz2 +0 -238
- data/test/import/samples/match_mover/kipPointsMatchmover.rz2 +0 -523
- data/test/import/samples/match_mover_rzml/md_145_1070_right_t1.rzml +0 -601
- data/test/import/samples/mayalive/mayalive_kipShot.txt +0 -1504
- data/test/import/samples/nuke/018.nk +0 -300
- data/test/import/samples/nuke/45trackers.nk +0 -331
- data/test/import/samples/nuke/A099_L008_0207TW_001_head_R.nk +0 -135
- data/test/import/samples/nuke/cornerpin.nk +0 -11
- data/test/import/samples/nuke/curve-start-with-curve-command.nk +0 -174
- data/test/import/samples/nuke/failing_nuke7_trackers_job_1872.nk +0 -112
- data/test/import/samples/nuke/nuke708_tracker.nk +0 -52
- data/test/import/samples/nuke/nuke7_planar.nk +0 -3143
- data/test/import/samples/nuke/nuke7_tracker_2tracks.nk +0 -116
- data/test/import/samples/nuke/nuke7_transform2d.nk +0 -69
- data/test/import/samples/nuke/nuke8_tracker4_copypastes.nk +0 -53
- data/test/import/samples/nuke/one_tracker_with_break.nk +0 -71
- data/test/import/samples/nuke/one_tracker_with_break_in_grp.nk +0 -91
- data/test/import/samples/nuke/planar.nk +0 -37692
- data/test/import/samples/nuke/reconciles.nk +0 -210
- data/test/import/samples/nuke/sh110_trackers_004_ipad1.nk +0 -56
- data/test/import/samples/nuke/skip_invalid_curve_expressions.nk +0 -62
- data/test/import/samples/nuke/track_nuke8.nk +0 -54
- data/test/import/samples/nuke/tracker4_with_empty_tracks_knob.nk +0 -13005
- data/test/import/samples/nuke/tracker_with_differing_gaps.nk +0 -82
- data/test/import/samples/nuke/tracker_with_repeating_gaps.nk +0 -79
- data/test/import/samples/pfmatchit/pfmatchit_example.2dt +0 -90
- data/test/import/samples/pftrack4/sourcefile_pftrack.2dt +0 -28972
- data/test/import/samples/pftrack5/apft.2dt +0 -164
- data/test/import/samples/pftrack5/empty_trackers.2dt +0 -30
- data/test/import/samples/pftrack5/garage.2dt +0 -79259
- data/test/import/samples/pftrack5/stereo.2dt +0 -21073
- data/test/import/samples/shake_script/205_030_shaketrack_v01_pd.shk +0 -379
- data/test/import/samples/shake_script/REDACTED_shake_file.shk +0 -317
- data/test/import/samples/shake_script/cliff_many_stabilize.shk +0 -675
- data/test/import/samples/shake_script/comments_inline_with_args.shk +0 -50
- data/test/import/samples/shake_script/designated_global_range_starting_at_negative_frame.shk +0 -496
- data/test/import/samples/shake_script/four_tracks_in_one_matchmove.shk +0 -323
- data/test/import/samples/shake_script/four_tracks_in_one_stabilizer.shk +0 -321
- data/test/import/samples/shake_script/from_matchmover.shk +0 -140
- data/test/import/samples/shake_script/ofx_vardefs.shk +0 -6
- data/test/import/samples/shake_script/oldTrackerNode.shk +0 -5
- data/test/import/samples/shake_script/shake_script_from_boujou.shk +0 -15
- data/test/import/samples/shake_script/shake_tracker_nodes.shk +0 -633
- data/test/import/samples/shake_script/shake_tracker_with_no_anim.shk +0 -6
- data/test/import/samples/shake_script/shake_trackers_with_Nspline.shk +0 -328
- data/test/import/samples/shake_script/stabilize_nodes_with_hermite.shk +0 -330
- data/test/import/samples/shake_script/three_tracks_in_one_stabilizer.shk +0 -320
- data/test/import/samples/shake_script/track.shk +0 -349
- data/test/import/samples/shake_script/two_tracks_in_one_tracker.shk +0 -319
- data/test/import/samples/shake_text/nuke_camtracker.txt +0 -11240
- data/test/import/samples/shake_text/one_shake_tracker.txt +0 -49
- data/test/import/samples/shake_text/one_shake_tracker_from_first.txt +0 -188
- data/test/import/samples/shake_text/two_shake_trackers.txt +0 -78
- data/test/import/samples/syntheyes_2d_paths/cola_plate.txt +0 -507
- data/test/import/samples/syntheyes_2d_paths/flyover2DP_syntheyes.txt +0 -12687
- data/test/import/samples/syntheyes_2d_paths/morePoints_sy2010.txt +0 -752
- data/test/import/samples/syntheyes_2d_paths/one_tracker.txt +0 -49
- data/test/import/samples/syntheyes_2d_paths/shake_tracker_nodes_to_syntheyes.txt +0 -4091
- data/test/import/samples/syntheyes_all_tracker_paths/shot06_2dTracks.txt +0 -6255
- data/test/import/test_3de_import.rb +0 -41
- data/test/import/test_3de_import3.rb +0 -33
- data/test/import/test_boujou_import.rb +0 -29
- data/test/import/test_flame_import.rb +0 -120
- data/test/import/test_match_mover_import.rb +0 -100
- data/test/import/test_match_mover_rzml_import.rb +0 -33
- data/test/import/test_maya_live_import.rb +0 -57
- data/test/import/test_nuke_import.rb +0 -298
- data/test/import/test_pftrack_import.rb +0 -94
- data/test/import/test_shake_catcher.rb +0 -85
- data/test/import/test_shake_lexer.rb +0 -204
- data/test/import/test_shake_script_import.rb +0 -164
- data/test/import/test_shake_text_import.rb +0 -71
- data/test/import/test_syntheyes_all_tracker_paths_import.rb +0 -26
- data/test/import/test_syntheyes_import.rb +0 -51
- data/test/test_blacklist.rb +0 -50
- data/test/test_block_init.rb +0 -48
- data/test/test_buffer_io.rb +0 -33
- data/test/test_casts.rb +0 -76
- data/test/test_cli.rb +0 -108
- data/test/test_const_name.rb +0 -12
- data/test/test_extio.rb +0 -28
- data/test/test_format_detector.rb +0 -39
- data/test/test_keyframe.rb +0 -56
- data/test/test_parameters.rb +0 -37
- data/test/test_pipeline.rb +0 -192
- data/test/test_safety.rb +0 -20
- data/test/test_simple_export.rb +0 -22
- data/test/test_tracker.rb +0 -149
- data/test/test_tracksperanto.rb +0 -88
- data/test/test_uv_coords.rb +0 -28
- data/test/test_yield_non_empty.rb +0 -10
- data/test/test_zip_tuples.rb +0 -31
- data/test/tools/test_crop_middleware.rb +0 -32
- data/test/tools/test_flip_middleware.rb +0 -18
- data/test/tools/test_flop_middleware.rb +0 -18
- data/test/tools/test_golden_middleware.rb +0 -25
- data/test/tools/test_length_cutoff_middleware.rb +0 -43
- data/test/tools/test_lens_middleware.rb +0 -77
- data/test/tools/test_lerp_middleware.rb +0 -28
- data/test/tools/test_lint_middleware.rb +0 -79
- data/test/tools/test_move_to_first_frame_middleware.rb +0 -37
- data/test/tools/test_pad_middleware.rb +0 -35
- data/test/tools/test_prefix.rb +0 -31
- data/test/tools/test_reformat_middleware.rb +0 -36
- data/test/tools/test_scaler_middleware.rb +0 -66
- data/test/tools/test_shift_middleware.rb +0 -31
- data/test/tools/test_slip_middleware.rb +0 -36
- data/test/tools/test_start_trim_middleware.rb +0 -36
data/test/test_tracksperanto.rb
DELETED
@@ -1,88 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__)) + '/helper'
|
2
|
-
|
3
|
-
class TracksperantoTest < Test::Unit::TestCase
|
4
|
-
def test_tools
|
5
|
-
m = Tracksperanto.tools
|
6
|
-
m.each do | tool_module |
|
7
|
-
assert_kind_of Module, tool_module
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
def test_exporters
|
12
|
-
m = Tracksperanto.exporters
|
13
|
-
m.each do | x |
|
14
|
-
assert_kind_of Class, x
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def test_importers
|
19
|
-
m = Tracksperanto.importers
|
20
|
-
m.each do | x |
|
21
|
-
assert_kind_of Class, x
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_importers_array_sorted_by_description
|
26
|
-
m = Tracksperanto.importers.map{|e| e.human_name }
|
27
|
-
assert_equal m.sort, m
|
28
|
-
end
|
29
|
-
|
30
|
-
def test_exporters_array_sorted_by_description
|
31
|
-
m = Tracksperanto.exporters.map{|e| e.human_name }
|
32
|
-
assert_equal m.sort, m
|
33
|
-
end
|
34
|
-
|
35
|
-
def test_tool_names
|
36
|
-
m = Tracksperanto.tool_names
|
37
|
-
assert m.include?("Golden")
|
38
|
-
end
|
39
|
-
|
40
|
-
def test_importer_names
|
41
|
-
m = Tracksperanto.importer_names
|
42
|
-
assert m.include?("FlameStabilizer")
|
43
|
-
end
|
44
|
-
|
45
|
-
def test_exporter_names
|
46
|
-
m = Tracksperanto.exporter_names
|
47
|
-
assert m.include?("PFTrack5")
|
48
|
-
end
|
49
|
-
|
50
|
-
def test_get_importer
|
51
|
-
i1 = Tracksperanto.get_importer("syntheyes")
|
52
|
-
assert_equal i1, Tracksperanto::Import::Syntheyes
|
53
|
-
end
|
54
|
-
|
55
|
-
def test_get_tool
|
56
|
-
i1 = Tracksperanto.get_tool("lERP")
|
57
|
-
assert_equal i1, Tracksperanto::Tool::Lerp
|
58
|
-
end
|
59
|
-
|
60
|
-
def test_get_importer_multicase
|
61
|
-
i1 = Tracksperanto.get_importer("ShakeScript")
|
62
|
-
assert_equal i1, Tracksperanto::Import::ShakeScript
|
63
|
-
end
|
64
|
-
|
65
|
-
def test_get_exporter
|
66
|
-
i1 = Tracksperanto.get_exporter("syntheyes")
|
67
|
-
assert_equal i1, Tracksperanto::Export::SynthEyes
|
68
|
-
|
69
|
-
i1 = Tracksperanto.get_exporter("SynThEyes")
|
70
|
-
assert_equal i1, Tracksperanto::Export::SynthEyes
|
71
|
-
|
72
|
-
i1 = Tracksperanto.get_exporter("SynthEyes")
|
73
|
-
assert_equal i1, Tracksperanto::Export::SynthEyes
|
74
|
-
end
|
75
|
-
|
76
|
-
def test_get_unknown_exporter_should_raise
|
77
|
-
assert_raise(Tracksperanto::UnknownExporterError) { Tracksperanto.get_exporter("foo") }
|
78
|
-
end
|
79
|
-
|
80
|
-
def test_get_unknown_importer_should_raise
|
81
|
-
assert_raise(Tracksperanto::UnknownImporterError) { Tracksperanto.get_importer("foo") }
|
82
|
-
end
|
83
|
-
|
84
|
-
def test_get_unknown_tool_should_raise
|
85
|
-
assert_raise(Tracksperanto::UnknownToolError) { Tracksperanto.get_tool("foo") }
|
86
|
-
end
|
87
|
-
|
88
|
-
end
|
data/test/test_uv_coords.rb
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__)) + '/helper'
|
2
|
-
|
3
|
-
class TestUVCoords < Test::Unit::TestCase
|
4
|
-
include Tracksperanto::UVCoordinates
|
5
|
-
|
6
|
-
DELTA = 0.001
|
7
|
-
|
8
|
-
def test_from_uv
|
9
|
-
assert_in_delta 719.5, convert_from_uv(1.0, 720), DELTA
|
10
|
-
assert_in_delta 0.5, convert_from_uv(-1.0, 720), DELTA
|
11
|
-
end
|
12
|
-
|
13
|
-
def test_from_uv_with_small_values
|
14
|
-
assert_in_delta 0.5, convert_from_uv(-1.0, 16), DELTA
|
15
|
-
assert_in_delta 15.5, convert_from_uv(1.0, 16), DELTA
|
16
|
-
end
|
17
|
-
|
18
|
-
def test_to_uv_with_small_values
|
19
|
-
assert_in_delta -1.0, convert_to_uv(0.5, 16), DELTA
|
20
|
-
assert_in_delta 1.0, convert_to_uv(15.5, 16), DELTA
|
21
|
-
end
|
22
|
-
|
23
|
-
|
24
|
-
def test_to_uv
|
25
|
-
assert_in_delta 1.0, convert_to_uv(719.5, 720), DELTA
|
26
|
-
assert_in_delta -1.0, convert_to_uv(0.5, 720), DELTA
|
27
|
-
end
|
28
|
-
end
|
data/test/test_zip_tuples.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__)) + '/helper'
|
2
|
-
|
3
|
-
class TestZipTuples < Test::Unit::TestCase
|
4
|
-
include Tracksperanto::ZipTuples
|
5
|
-
|
6
|
-
def test_zip_with_empty
|
7
|
-
assert_equal [], zip_curve_tuples([])
|
8
|
-
end
|
9
|
-
|
10
|
-
def test_zip_with_standard_dataset
|
11
|
-
assert_equal [[1, 123, 234]], zip_curve_tuples([[1, 123]], [[1, 234]])
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_zip_with_missing_step
|
15
|
-
assert_equal [[1, 123, 234]], zip_curve_tuples([[1, 123], [2, 456]], [[1, 234]])
|
16
|
-
end
|
17
|
-
|
18
|
-
def test_zip_with_two_curves
|
19
|
-
curve_a = [[1, 123], [2, 345]]
|
20
|
-
curve_b = [[1, 23.4], [2, 14.5]]
|
21
|
-
result = [[1, 123, 23.4], [2, 345, 14.5]]
|
22
|
-
assert_equal result, zip_curve_tuples(curve_a, curve_b)
|
23
|
-
end
|
24
|
-
|
25
|
-
def test_zip_with_negative_frame_indices
|
26
|
-
curve_a = [[-100, 123], [24, 345]]
|
27
|
-
curve_b = [[-100, 23.4], [24, 14.5]]
|
28
|
-
result = [[-100, 123, 23.4], [24, 345, 14.5]]
|
29
|
-
assert_equal result, zip_curve_tuples(curve_a, curve_b)
|
30
|
-
end
|
31
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../helper'
|
2
|
-
|
3
|
-
class CropToolTest < Test::Unit::TestCase
|
4
|
-
|
5
|
-
def test_action_description
|
6
|
-
assert_equal "Crop or pad the image by a specified number of pixels", Tracksperanto::Tool::Crop.action_description
|
7
|
-
end
|
8
|
-
|
9
|
-
def test_crop_supports_hash_init
|
10
|
-
receiver = flexmock
|
11
|
-
m = Tracksperanto::Tool::Crop.new(receiver, :left => 13, :right => 0, :top => 25)
|
12
|
-
end
|
13
|
-
|
14
|
-
def test_shift_bypasses_methods
|
15
|
-
receiver = flexmock
|
16
|
-
padded_w, padded_h = 720 - 60, 576 + 58
|
17
|
-
|
18
|
-
receiver.should_receive(:start_export).once.with(padded_w, padded_h)
|
19
|
-
receiver.should_receive(:start_tracker_segment).once.with("Tracker")
|
20
|
-
receiver.should_receive(:export_point).once.with(1, 120.0, -28.0, 0)
|
21
|
-
receiver.should_receive(:end_tracker_segment).once
|
22
|
-
receiver.should_receive(:end_export).once
|
23
|
-
|
24
|
-
m = Tracksperanto::Tool::Crop.new(receiver, :left => -60, :bottom => 58)
|
25
|
-
m.start_export(720, 576)
|
26
|
-
m.start_tracker_segment("Tracker")
|
27
|
-
m.export_point(1, 60, 30, 0)
|
28
|
-
m.end_tracker_segment
|
29
|
-
m.end_export
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../helper'
|
2
|
-
|
3
|
-
class FlipToolTest < Test::Unit::TestCase
|
4
|
-
|
5
|
-
def test_action_description
|
6
|
-
assert_equal "Mirrors all the tracker paths horizontally", Tracksperanto::Tool::Flip.action_description
|
7
|
-
end
|
8
|
-
|
9
|
-
def test_export_with_enabled_flip
|
10
|
-
receiver = flexmock(:exporter)
|
11
|
-
receiver.should_receive(:start_export).once.with(110, 120)
|
12
|
-
receiver.should_receive(:export_point).once.with(1, 100, 95, 0)
|
13
|
-
|
14
|
-
m = Tracksperanto::Tool::Flip.new(receiver)
|
15
|
-
m.start_export(110, 120)
|
16
|
-
m.export_point(1, 10, 95, 0)
|
17
|
-
end
|
18
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../helper'
|
2
|
-
|
3
|
-
class FlopToolTest < Test::Unit::TestCase
|
4
|
-
|
5
|
-
def test_action_description
|
6
|
-
assert_equal "Mirror all the tracker paths vertically", Tracksperanto::Tool::Flop.action_description
|
7
|
-
end
|
8
|
-
|
9
|
-
def test_export_flip_and_flop
|
10
|
-
receiver = flexmock(:exporter)
|
11
|
-
receiver.should_receive(:start_export).once.with(110, 120)
|
12
|
-
receiver.should_receive(:export_point).once.with(1, 10, 25, 0)
|
13
|
-
|
14
|
-
m = Tracksperanto::Tool::Flop.new(receiver)
|
15
|
-
m.start_export(110, 120)
|
16
|
-
m.export_point(1, 10, 95, 0)
|
17
|
-
end
|
18
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../helper'
|
2
|
-
|
3
|
-
class GoldenToolTest < Test::Unit::TestCase
|
4
|
-
|
5
|
-
def test_action_description
|
6
|
-
assert_equal "Reset residual of all the trackers to zero", Tracksperanto::Tool::Golden.action_description
|
7
|
-
end
|
8
|
-
|
9
|
-
def test_golden_bypasses_methods
|
10
|
-
receiver = flexmock
|
11
|
-
|
12
|
-
receiver.should_receive(:start_export).once.with(120,120)
|
13
|
-
receiver.should_receive(:start_tracker_segment).once.with("Tracker")
|
14
|
-
receiver.should_receive(:export_point).once.with(0, 100, 100, 0.0)
|
15
|
-
receiver.should_receive(:end_tracker_segment).once
|
16
|
-
receiver.should_receive(:end_export).once
|
17
|
-
|
18
|
-
m = Tracksperanto::Tool::Golden.new(receiver)
|
19
|
-
m.start_export(120, 120)
|
20
|
-
m.start_tracker_segment("Tracker")
|
21
|
-
m.export_point(0, 100, 100, 0.56)
|
22
|
-
m.end_tracker_segment
|
23
|
-
m.end_export
|
24
|
-
end
|
25
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../helper'
|
2
|
-
|
3
|
-
class LengthCutoffToolTest < Test::Unit::TestCase
|
4
|
-
|
5
|
-
def test_action_description
|
6
|
-
assert_equal "Remove trackers that have less than the specified number of keyframes", Tracksperanto::Tool::LengthCutoff.action_description
|
7
|
-
end
|
8
|
-
|
9
|
-
def test_default_length_set_to_zero_and_ignored
|
10
|
-
receiver = flexmock
|
11
|
-
m = Tracksperanto::Tool::LengthCutoff.new(receiver)
|
12
|
-
assert_equal 0, m.min_length
|
13
|
-
end
|
14
|
-
|
15
|
-
def test_slip_supports_hash_init
|
16
|
-
receiver = flexmock
|
17
|
-
m = Tracksperanto::Tool::LengthCutoff.new(receiver, :min_length => 23)
|
18
|
-
assert_equal 23, m.min_length
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_slipper_bypasses_methods
|
22
|
-
receiver = flexmock
|
23
|
-
receiver.should_receive(:start_export).once.with(120,120)
|
24
|
-
receiver.should_receive(:start_tracker_segment).once.with("Tracker")
|
25
|
-
12.times do | i |
|
26
|
-
receiver.should_receive(:export_point).with(i, 100, 100, 0)
|
27
|
-
end
|
28
|
-
receiver.should_receive(:end_tracker_segment).once
|
29
|
-
receiver.should_receive(:end_export).once
|
30
|
-
|
31
|
-
|
32
|
-
m = Tracksperanto::Tool::LengthCutoff.new(receiver, :min_length => 12)
|
33
|
-
m.start_export(120, 120)
|
34
|
-
m.start_tracker_segment("Tracker")
|
35
|
-
12.times {|t| m.export_point(t, 100, 100, 0) }
|
36
|
-
m.end_tracker_segment
|
37
|
-
m.start_tracker_segment("Tracker2")
|
38
|
-
11.times {|t| m.export_point(t, 100, 100, 0) }
|
39
|
-
m.end_tracker_segment
|
40
|
-
m.end_export
|
41
|
-
|
42
|
-
end
|
43
|
-
end
|
@@ -1,77 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../helper'
|
2
|
-
|
3
|
-
class LensToolTest < Test::Unit::TestCase
|
4
|
-
|
5
|
-
include Approximately
|
6
|
-
|
7
|
-
def test_action_description
|
8
|
-
assert_equal "Apply or remove lens distortion with the Syntheyes algorithm", Tracksperanto::Tool::LensDisto.action_description
|
9
|
-
end
|
10
|
-
|
11
|
-
def test_lens_bypasses_centerpoint
|
12
|
-
receiver = flexmock
|
13
|
-
receiver.should_receive(:start_export).once.with(1920, 1080)
|
14
|
-
receiver.should_receive(:start_tracker_segment).once.with("Tracker")
|
15
|
-
receiver.should_receive(:export_point).once.with(1, 1920 / 2.0, 1080.0 / 2.0, 0)
|
16
|
-
receiver.should_receive(:end_tracker_segment).once
|
17
|
-
receiver.should_receive(:end_export).once
|
18
|
-
|
19
|
-
m = Tracksperanto::Tool::LensDisto.new(receiver, :k => 0.0168)
|
20
|
-
m.start_export(1920, 1080)
|
21
|
-
m.start_tracker_segment("Tracker")
|
22
|
-
m.export_point(1, 1920 / 2.0, 1080.0 / 2.0, 0)
|
23
|
-
m.end_tracker_segment
|
24
|
-
m.end_export
|
25
|
-
end
|
26
|
-
|
27
|
-
def test_lens_distorted
|
28
|
-
receiver = flexmock
|
29
|
-
receiver.should_receive(:start_export).once.with(1920, 1080)
|
30
|
-
receiver.should_receive(:start_tracker_segment).once.with("Tracker")
|
31
|
-
receiver.should_receive(:export_point).once.with(1, approx(66.06), approx(43.99), approx(0))
|
32
|
-
|
33
|
-
receiver.should_receive(:end_tracker_segment).once
|
34
|
-
receiver.should_receive(:end_export).once
|
35
|
-
|
36
|
-
m = Tracksperanto::Tool::LensDisto.new(receiver, :k => -0.0298, :kcube => 0.0078)
|
37
|
-
m.start_export(1920, 1080)
|
38
|
-
m.start_tracker_segment("Tracker")
|
39
|
-
m.export_point(1, 12.0, 14.0, 0)
|
40
|
-
m.end_tracker_segment
|
41
|
-
m.end_export
|
42
|
-
end
|
43
|
-
|
44
|
-
def test_lens_undistorted
|
45
|
-
receiver = flexmock
|
46
|
-
receiver.should_receive(:start_export).once.with(1920, 1080)
|
47
|
-
receiver.should_receive(:start_tracker_segment).once.with("Tracker")
|
48
|
-
receiver.should_receive(:export_point).once.with(1, approx(11.96), approx(13.98), 0)
|
49
|
-
receiver.should_receive(:end_tracker_segment).once
|
50
|
-
receiver.should_receive(:end_export).once
|
51
|
-
|
52
|
-
m = Tracksperanto::Tool::LensDisto.new(receiver, :k => -0.0298, :kcube => 0.0078, :remove => true)
|
53
|
-
m.start_export(1920, 1080)
|
54
|
-
m.start_tracker_segment("Tracker")
|
55
|
-
m.export_point(1, 66.03001446825158, 43.978678913818925, 0)
|
56
|
-
m.end_tracker_segment
|
57
|
-
m.end_export
|
58
|
-
end
|
59
|
-
|
60
|
-
def test_roundtrip
|
61
|
-
receiver = flexmock
|
62
|
-
receiver.should_receive(:start_export).once.with(1920, 1080)
|
63
|
-
receiver.should_receive(:start_tracker_segment).once.with("Tracker")
|
64
|
-
receiver.should_receive(:export_point).once.with(1, approx(0.984), approx(0.991), 0)
|
65
|
-
receiver.should_receive(:end_tracker_segment).once
|
66
|
-
receiver.should_receive(:end_export).once
|
67
|
-
|
68
|
-
apply = Tracksperanto::Tool::LensDisto.new(receiver, :k => -0.0298, :kcube => 0.2178)
|
69
|
-
remove = Tracksperanto::Tool::LensDisto.new(apply, :k => -0.0298, :kcube => 0.2178, :remove => true)
|
70
|
-
|
71
|
-
remove.start_export(1920, 1080)
|
72
|
-
remove.start_tracker_segment("Tracker")
|
73
|
-
remove.export_point(1, 1.0, 1.0, 0)
|
74
|
-
remove.end_tracker_segment
|
75
|
-
remove.end_export
|
76
|
-
end
|
77
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../helper'
|
2
|
-
|
3
|
-
class LerpToolTest < Test::Unit::TestCase
|
4
|
-
|
5
|
-
def test_action_description
|
6
|
-
assert_equal "Interpolate missing keyframes of all the trackers", Tracksperanto::Tool::Lerp.action_description
|
7
|
-
end
|
8
|
-
|
9
|
-
def test_lerp
|
10
|
-
receiver = flexmock
|
11
|
-
m = Tracksperanto::Tool::Lerp.new(receiver)
|
12
|
-
receiver.should_receive(:start_export).with(720, 576).once
|
13
|
-
receiver.should_receive(:start_tracker_segment).with("Foo").once
|
14
|
-
receiver.should_receive(:export_point).with(1, 1.0, 2.0, 0).once
|
15
|
-
receiver.should_receive(:export_point).with(2, 2.0, 3.0, 0).once
|
16
|
-
receiver.should_receive(:export_point).with(3, 3.0, 4.0, 0).once
|
17
|
-
receiver.should_receive(:export_point).with(4, 4.0, 5.0, 0).once
|
18
|
-
receiver.should_receive(:end_tracker_segment).once
|
19
|
-
receiver.should_receive(:end_export).once
|
20
|
-
|
21
|
-
m.start_export(720, 576)
|
22
|
-
m.start_tracker_segment("Foo")
|
23
|
-
m.export_point(1, 1.0, 2.0, 0)
|
24
|
-
m.export_point(4, 4.0, 5.0, 0)
|
25
|
-
m.end_tracker_segment
|
26
|
-
m.end_export
|
27
|
-
end
|
28
|
-
end
|
@@ -1,79 +0,0 @@
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__)) + '/../helper'
|
2
|
-
|
3
|
-
class LintToolTest < Test::Unit::TestCase
|
4
|
-
|
5
|
-
def test_action_description
|
6
|
-
assert_equal "Verify all the exported trackers and check for errors", Tracksperanto::Tool::Lint.action_description
|
7
|
-
end
|
8
|
-
|
9
|
-
def test_empty_export_raises
|
10
|
-
m = flexmock
|
11
|
-
m.should_receive(:start_export).once
|
12
|
-
|
13
|
-
ex = Tracksperanto::Tool::Lint.new(m)
|
14
|
-
ex.start_export(100, 100)
|
15
|
-
assert_raise(Tracksperanto::Tool::Lint::NoTrackersExportedError) do
|
16
|
-
ex.end_export
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
20
|
-
|
21
|
-
def test_exporting_empty_tracker_raises
|
22
|
-
m = flexmock
|
23
|
-
m.should_receive(:start_export).once
|
24
|
-
m.should_receive(:start_tracker_segment).once
|
25
|
-
|
26
|
-
ex = Tracksperanto::Tool::Lint.new(m)
|
27
|
-
ex.start_export(100, 100)
|
28
|
-
ex.start_tracker_segment("Foo")
|
29
|
-
|
30
|
-
assert_raise(Tracksperanto::Tool::Lint::EmptyTrackerSentError) do
|
31
|
-
ex.end_tracker_segment
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
def test_exporting_out_of_sequence_raises
|
36
|
-
m = flexmock
|
37
|
-
m.should_receive(:start_export).once
|
38
|
-
m.should_receive(:start_tracker_segment).once
|
39
|
-
m.should_receive(:export_point).once
|
40
|
-
|
41
|
-
ex = Tracksperanto::Tool::Lint.new(m)
|
42
|
-
ex.start_export(100, 100)
|
43
|
-
ex.start_tracker_segment("Foo")
|
44
|
-
ex.export_point(2, 123.3, 456.0, 0.0)
|
45
|
-
|
46
|
-
assert_raise(Tracksperanto::Tool::Lint::NonSequentialKeyframes) do
|
47
|
-
ex.export_point(1, 123.3, 456.0, 0.0)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
|
52
|
-
def test_exporting_in_sequence_starting_on_frame_minus_one
|
53
|
-
m = flexmock
|
54
|
-
m.should_receive(:start_export).once
|
55
|
-
m.should_receive(:start_tracker_segment).once
|
56
|
-
m.should_receive(:export_point).twice
|
57
|
-
|
58
|
-
ex = Tracksperanto::Tool::Lint.new(m)
|
59
|
-
ex.start_export(100, 100)
|
60
|
-
ex.start_tracker_segment("Foo")
|
61
|
-
ex.export_point(-1, 123.3, 456.0, 0.0)
|
62
|
-
ex.export_point(0, 123.3, 456.0, 0.0)
|
63
|
-
end
|
64
|
-
|
65
|
-
def test_exporting_with_two_starts_raises
|
66
|
-
m = flexmock
|
67
|
-
m.should_receive(:start_export).once
|
68
|
-
m.should_receive(:start_tracker_segment).once
|
69
|
-
|
70
|
-
ex = Tracksperanto::Tool::Lint.new(m)
|
71
|
-
ex.start_export(100, 100)
|
72
|
-
ex.start_tracker_segment("Foo")
|
73
|
-
|
74
|
-
assert_raise(Tracksperanto::Tool::Lint::TrackerRestartedError) do
|
75
|
-
ex.start_tracker_segment("Bar")
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
end
|