vslamlab integration
Browse files- glomap_mapper.sh +78 -31
- vslamlab_glomap_settings.yaml +59 -26
glomap_mapper.sh
CHANGED
|
@@ -4,10 +4,9 @@ echo "Executing glomapMapper.sh ..."
|
|
| 4 |
sequence_path="$1"
|
| 5 |
exp_folder="$2"
|
| 6 |
exp_id="$3"
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
rgb_txt="$7"
|
| 11 |
|
| 12 |
|
| 13 |
exp_folder_colmap="${exp_folder}/colmap_${exp_id}"
|
|
@@ -24,53 +23,101 @@ then
|
|
| 24 |
fi
|
| 25 |
|
| 26 |
# Reading settings from yaml file
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
RelPoseEstimation_max_epipolar_error=$(yq '.RelPoseEstimation.max_epipolar_error // 1.0' $settings_yaml)
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
Triangulation_complete_max_reproj_error=$(yq '.Triangulation.complete_max_reproj_error // 15.0' $settings_yaml)
|
| 32 |
Triangulation_merge_max_reproj_error=$(yq '.Triangulation.merge_max_reproj_error // 15.0' $settings_yaml)
|
| 33 |
Triangulation_min_angle=$(yq '.Triangulation.min_angle // 1.0' $settings_yaml)
|
| 34 |
-
Triangulation_min_num_matches=$(yq '.Triangulation.min_num_matches // 15
|
| 35 |
|
| 36 |
Thresholds_max_epipolar_error_E=$(yq '.Thresholds.max_epipolar_error_E // 1.0' $settings_yaml)
|
| 37 |
Thresholds_max_epipolar_error_F=$(yq '.Thresholds.max_epipolar_error_F // 4.0' $settings_yaml)
|
| 38 |
Thresholds_max_epipolar_error_H=$(yq '.Thresholds.max_epipolar_error_H // 4.0' $settings_yaml)
|
| 39 |
-
|
| 40 |
Thresholds_min_inlier_num=$(yq '.Thresholds.min_inlier_num // 30.0' $settings_yaml)
|
| 41 |
Thresholds_min_inlier_ratio=$(yq '.Thresholds.min_inlier_ratio // 0.25' $settings_yaml)
|
| 42 |
Thresholds_max_rotation_error=$(yq '.Thresholds.max_rotation_error // 10.0' $settings_yaml)
|
| 43 |
|
| 44 |
-
Thresholds_max_angle_error=$(yq '.Thresholds.max_angle_error // 1.0' $settings_yaml)
|
| 45 |
-
Thresholds_max_reprojection_error=$(yq '.Thresholds.max_reprojection_error // 0.01' $settings_yaml)
|
| 46 |
-
Thresholds_min_triangulation_angle=$(yq '.Thresholds.min_triangulation_angle // 1.0' $settings_yaml)
|
| 47 |
-
|
| 48 |
-
|
| 49 |
echo " glomap mapper ..."
|
| 50 |
database="${exp_folder_colmap}/colmap_database.db"
|
| 51 |
|
|
|
|
| 52 |
glomap mapper \
|
| 53 |
-
--database_path ${database} \
|
| 54 |
-
--image_path ${rgb_path} \
|
| 55 |
-
--output_path ${exp_folder_colmap} \
|
|
|
|
|
|
|
|
|
|
| 56 |
--skip_view_graph_calibration "${skip_view_graph_calibration}" \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
--RelPoseEstimation.max_epipolar_error "${RelPoseEstimation_max_epipolar_error}" \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
--GlobalPositioning.thres_loss_function "${GlobalPositioning_thres_loss_function}" \
|
| 59 |
-
--
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
|
|
|
|
|
|
| 74 |
|
| 75 |
echo " colmap model_converter ..."
|
| 76 |
colmap model_converter \
|
|
|
|
| 4 |
sequence_path="$1"
|
| 5 |
exp_folder="$2"
|
| 6 |
exp_id="$3"
|
| 7 |
+
settings_yaml="$4"
|
| 8 |
+
calibration_yaml="$5"
|
| 9 |
+
rgb_txt="$6"
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
exp_folder_colmap="${exp_folder}/colmap_${exp_id}"
|
|
|
|
| 23 |
fi
|
| 24 |
|
| 25 |
# Reading settings from yaml file
|
| 26 |
+
ba_iteration_num=$(yq '.ba.iteration_num // 3' $settings_yaml)
|
| 27 |
+
retriangulation_iteration_num=$(yq '.retriangulation.iteration_num // 1' $settings_yaml)
|
| 28 |
+
|
| 29 |
+
skip_preprocessing=$(yq '.skip.preprocessing // 0' $settings_yaml)
|
| 30 |
+
skip_view_graph_calibration=$(yq '.skip.view_graph_calibration // 0' $settings_yaml)
|
| 31 |
+
skip_relative_pose_estimation=$(yq '.skip.relative_pose_estimation // 0' $settings_yaml)
|
| 32 |
+
skip_rotation_averaging=$(yq '.skip.rotation_averaging // 0' $settings_yaml)
|
| 33 |
+
skip_global_positioning=$(yq '.skip.global_positioning // 0' $settings_yaml)
|
| 34 |
+
skip_bundle_adjustment=$(yq '.skip.bundle_adjustment // 0' $settings_yaml)
|
| 35 |
+
skip_retriangulation_stage=$(yq '.skip.retriangulation_stage // 0' $settings_yaml)
|
| 36 |
+
skip_pruning=$(yq '.skip.pruning // 0' $settings_yaml)
|
| 37 |
+
|
| 38 |
+
ViewGraphCalib_thres_lower_ratio=$(yq '.ViewGraphCalib.thres_lower_ratio // 0.1' $settings_yaml)
|
| 39 |
+
ViewGraphCalib_thres_higher_ratio=$(yq '.ViewGraphCalib.thres_higher_ratio // 10.0' $settings_yaml)
|
| 40 |
+
ViewGraphCalib_thres_two_view_error=$(yq '.ViewGraphCalib.thres_two_view_error // 2.0' $settings_yaml)
|
| 41 |
+
|
| 42 |
RelPoseEstimation_max_epipolar_error=$(yq '.RelPoseEstimation.max_epipolar_error // 1.0' $settings_yaml)
|
| 43 |
+
|
| 44 |
+
TrackEstablishment_min_num_tracks_per_view=$(yq '.TrackEstablishment.min_num_tracks_per_view // -1' $settings_yaml)
|
| 45 |
+
TrackEstablishment_min_num_view_per_track=$(yq '.TrackEstablishment.min_num_view_per_track // 3' $settings_yaml)
|
| 46 |
+
TrackEstablishment_max_num_view_per_track=$(yq '.TrackEstablishment.max_num_view_per_track // 100' $settings_yaml)
|
| 47 |
+
TrackEstablishment_max_num_tracks=$(yq '.TrackEstablishment.max_num_tracks // 10000000' $settings_yaml)
|
| 48 |
+
|
| 49 |
+
GlobalPositioning_optimize_positions=$(yq '.GlobalPositioning.optimize_positions // 1' $settings_yaml)
|
| 50 |
+
GlobalPositioning_optimize_points=$(yq '.GlobalPositioning.optimize_points // 1' $settings_yaml)
|
| 51 |
+
GlobalPositioning_optimize_scales=$(yq '.GlobalPositioning.optimize_scales // 1' $settings_yaml)
|
| 52 |
+
GlobalPositioning_thres_loss_function=$(yq '.GlobalPositioning.thres_loss_function // 0.1' $settings_yaml)
|
| 53 |
+
GlobalPositioning_max_num_iterations=$(yq '.GlobalPositioning.max_num_iterations // 100' $settings_yaml)
|
| 54 |
+
|
| 55 |
+
BundleAdjustment_optimize_rotations=$(yq '.BundleAdjustment.optimize_rotations // 1' $settings_yaml)
|
| 56 |
+
BundleAdjustment_optimize_translation=$(yq '.BundleAdjustment.optimize_translation // 1' $settings_yaml)
|
| 57 |
+
BundleAdjustment_optimize_intrinsics=$(yq '.BundleAdjustment.optimize_intrinsics // 1' $settings_yaml)
|
| 58 |
+
BundleAdjustment_optimize_points=$(yq '.BundleAdjustment.optimize_points // 1' $settings_yaml)
|
| 59 |
+
BundleAdjustment_thres_loss_function=$(yq '.BundleAdjustment.thres_loss_function // 1.0' $settings_yaml)
|
| 60 |
+
BundleAdjustment_max_num_iterations=$(yq '.BundleAdjustment.max_num_iterations // 200' $settings_yaml)
|
| 61 |
|
| 62 |
Triangulation_complete_max_reproj_error=$(yq '.Triangulation.complete_max_reproj_error // 15.0' $settings_yaml)
|
| 63 |
Triangulation_merge_max_reproj_error=$(yq '.Triangulation.merge_max_reproj_error // 15.0' $settings_yaml)
|
| 64 |
Triangulation_min_angle=$(yq '.Triangulation.min_angle // 1.0' $settings_yaml)
|
| 65 |
+
Triangulation_min_num_matches=$(yq '.Triangulation.min_num_matches // 15' $settings_yaml)
|
| 66 |
|
| 67 |
Thresholds_max_epipolar_error_E=$(yq '.Thresholds.max_epipolar_error_E // 1.0' $settings_yaml)
|
| 68 |
Thresholds_max_epipolar_error_F=$(yq '.Thresholds.max_epipolar_error_F // 4.0' $settings_yaml)
|
| 69 |
Thresholds_max_epipolar_error_H=$(yq '.Thresholds.max_epipolar_error_H // 4.0' $settings_yaml)
|
|
|
|
| 70 |
Thresholds_min_inlier_num=$(yq '.Thresholds.min_inlier_num // 30.0' $settings_yaml)
|
| 71 |
Thresholds_min_inlier_ratio=$(yq '.Thresholds.min_inlier_ratio // 0.25' $settings_yaml)
|
| 72 |
Thresholds_max_rotation_error=$(yq '.Thresholds.max_rotation_error // 10.0' $settings_yaml)
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
echo " glomap mapper ..."
|
| 75 |
database="${exp_folder_colmap}/colmap_database.db"
|
| 76 |
|
| 77 |
+
|
| 78 |
glomap mapper \
|
| 79 |
+
--database_path "${database}" \
|
| 80 |
+
--image_path "${rgb_path}" \
|
| 81 |
+
--output_path "${exp_folder_colmap}" \
|
| 82 |
+
--ba_iteration_num "${ba_iteration_num}" \
|
| 83 |
+
--retriangulation_iteration_num "${retriangulation_iteration_num}" \
|
| 84 |
+
--skip_preprocessing "${skip_preprocessing}" \
|
| 85 |
--skip_view_graph_calibration "${skip_view_graph_calibration}" \
|
| 86 |
+
--skip_relative_pose_estimation "${skip_relative_pose_estimation}" \
|
| 87 |
+
--skip_rotation_averaging "${skip_rotation_averaging}" \
|
| 88 |
+
--skip_global_positioning "${skip_global_positioning}" \
|
| 89 |
+
--skip_bundle_adjustment "${skip_bundle_adjustment}" \
|
| 90 |
+
--skip_retriangulation "${skip_retriangulation_stage}" \
|
| 91 |
+
--skip_pruning "${skip_pruning}" \
|
| 92 |
+
--ViewGraphCalib.thres_lower_ratio "${ViewGraphCalib_thres_lower_ratio}" \
|
| 93 |
+
--ViewGraphCalib.thres_higher_ratio "${ViewGraphCalib_thres_higher_ratio}" \
|
| 94 |
+
--ViewGraphCalib.thres_two_view_error "${ViewGraphCalib_thres_two_view_error}" \
|
| 95 |
--RelPoseEstimation.max_epipolar_error "${RelPoseEstimation_max_epipolar_error}" \
|
| 96 |
+
--TrackEstablishment.min_num_tracks_per_view "${TrackEstablishment_min_num_tracks_per_view}" \
|
| 97 |
+
--TrackEstablishment.min_num_view_per_track "${TrackEstablishment_min_num_view_per_track}" \
|
| 98 |
+
--TrackEstablishment.max_num_view_per_track "${TrackEstablishment_max_num_view_per_track}" \
|
| 99 |
+
--TrackEstablishment.max_num_tracks "${TrackEstablishment_max_num_tracks}" \
|
| 100 |
+
--GlobalPositioning.optimize_positions "${GlobalPositioning_optimize_positions}" \
|
| 101 |
+
--GlobalPositioning.optimize_points "${GlobalPositioning_optimize_points}" \
|
| 102 |
+
--GlobalPositioning.optimize_scales "${GlobalPositioning_optimize_scales}" \
|
| 103 |
--GlobalPositioning.thres_loss_function "${GlobalPositioning_thres_loss_function}" \
|
| 104 |
+
--GlobalPositioning.max_num_iterations "${GlobalPositioning_max_num_iterations}" \
|
| 105 |
+
--BundleAdjustment.optimize_rotations "${BundleAdjustment_optimize_rotations}" \
|
| 106 |
+
--BundleAdjustment.optimize_translation "${BundleAdjustment_optimize_translation}" \
|
| 107 |
+
--BundleAdjustment.optimize_intrinsics "${BundleAdjustment_optimize_intrinsics}" \
|
| 108 |
+
--BundleAdjustment.optimize_points "${BundleAdjustment_optimize_points}" \
|
| 109 |
+
--BundleAdjustment.thres_loss_function "${BundleAdjustment_thres_loss_function}" \
|
| 110 |
+
--BundleAdjustment.max_num_iterations "${BundleAdjustment_max_num_iterations}" \
|
| 111 |
+
--Triangulation.complete_max_reproj_error "${Triangulation_complete_max_reproj_error}" \
|
| 112 |
+
--Triangulation.merge_max_reproj_error "${Triangulation_merge_max_reproj_error}" \
|
| 113 |
+
--Triangulation.min_angle "${Triangulation_min_angle}" \
|
| 114 |
+
--Triangulation.min_num_matches "${Triangulation_min_num_matches}" \
|
| 115 |
+
--Thresholds.max_epipolar_error_E "${Thresholds_max_epipolar_error_E}" \
|
| 116 |
+
--Thresholds.max_epipolar_error_F "${Thresholds_max_epipolar_error_F}" \
|
| 117 |
+
--Thresholds.max_epipolar_error_H "${Thresholds_max_epipolar_error_H}" \
|
| 118 |
+
--Thresholds.min_inlier_num "${Thresholds_min_inlier_num}" \
|
| 119 |
+
--Thresholds.min_inlier_ratio "${Thresholds_min_inlier_ratio}" \
|
| 120 |
+
--Thresholds.max_rotation_error "${Thresholds_max_rotation_error}"
|
| 121 |
|
| 122 |
echo " colmap model_converter ..."
|
| 123 |
colmap model_converter \
|
vslamlab_glomap_settings.yaml
CHANGED
|
@@ -1,29 +1,3 @@
|
|
| 1 |
-
BundleAdjustment:
|
| 2 |
-
thres_loss_function: 1.0
|
| 3 |
-
|
| 4 |
-
RelPoseEstimation:
|
| 5 |
-
max_epipolar_error: 1.0
|
| 6 |
-
|
| 7 |
-
GlobalPositioning:
|
| 8 |
-
thres_loss_function: 0.10000000000000001
|
| 9 |
-
|
| 10 |
-
Triangulation:
|
| 11 |
-
complete_max_reproj_error: 15.0
|
| 12 |
-
merge_max_reproj_error: 15.0
|
| 13 |
-
min_angle: 1.0
|
| 14 |
-
min_num_matches: 15
|
| 15 |
-
|
| 16 |
-
Thresholds:
|
| 17 |
-
max_angle_error: 1.0
|
| 18 |
-
max_reprojection_error: 0.01
|
| 19 |
-
min_triangulation_angle: 1.0
|
| 20 |
-
min_inlier_num: 30.0
|
| 21 |
-
min_inlier_ratio: 0.25
|
| 22 |
-
max_rotation_error: 10.0
|
| 23 |
-
max_epipolar_error_E: 1.0
|
| 24 |
-
max_epipolar_error_F: 4.0
|
| 25 |
-
max_epipolar_error_H: 4.0
|
| 26 |
-
|
| 27 |
feature_extractor:
|
| 28 |
SiftExtraction_num_octaves: 4
|
| 29 |
SiftExtraction_octave_resolution: 3
|
|
@@ -43,3 +17,62 @@ matcher:
|
|
| 43 |
SequentialMatching_overlap: 10
|
| 44 |
SequentialMatching_quadratic_overlap: 1
|
| 45 |
ExhaustiveMatching_block_size: 50
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
feature_extractor:
|
| 2 |
SiftExtraction_num_octaves: 4
|
| 3 |
SiftExtraction_octave_resolution: 3
|
|
|
|
| 17 |
SequentialMatching_overlap: 10
|
| 18 |
SequentialMatching_quadratic_overlap: 1
|
| 19 |
ExhaustiveMatching_block_size: 50
|
| 20 |
+
|
| 21 |
+
ba:
|
| 22 |
+
iteration_num: 3
|
| 23 |
+
|
| 24 |
+
retriangulation:
|
| 25 |
+
iteration_num: 1
|
| 26 |
+
|
| 27 |
+
skip:
|
| 28 |
+
preprocessing: 0
|
| 29 |
+
view_graph_calibration: 0
|
| 30 |
+
relative_pose_estimation: 0
|
| 31 |
+
rotation_averaging: 0
|
| 32 |
+
global_positioning: 0
|
| 33 |
+
bundle_adjustment: 0
|
| 34 |
+
retriangulation_stage: 0
|
| 35 |
+
pruning: 0
|
| 36 |
+
|
| 37 |
+
ViewGraphCalib:
|
| 38 |
+
thres_lower_ratio: 0.10000000000000001
|
| 39 |
+
thres_higher_ratio: 10.0
|
| 40 |
+
thres_two_view_error: 2.0
|
| 41 |
+
|
| 42 |
+
RelPoseEstimation:
|
| 43 |
+
max_epipolar_error: 1.
|
| 44 |
+
|
| 45 |
+
TrackEstablishment:
|
| 46 |
+
min_num_tracks_per_view: -1
|
| 47 |
+
min_num_view_per_track: 3
|
| 48 |
+
max_num_view_per_track: 100
|
| 49 |
+
max_num_tracks: 10000000
|
| 50 |
+
|
| 51 |
+
GlobalPositioning:
|
| 52 |
+
optimize_positions: 1
|
| 53 |
+
optimize_points: 1
|
| 54 |
+
optimize_scales: 1
|
| 55 |
+
thres_loss_function: 0.10000000000000001
|
| 56 |
+
max_num_iterations: 100
|
| 57 |
+
|
| 58 |
+
BundleAdjustment:
|
| 59 |
+
optimize_rotations: 1
|
| 60 |
+
optimize_translation: 1
|
| 61 |
+
optimize_intrinsics: 1
|
| 62 |
+
optimize_points: 1
|
| 63 |
+
thres_loss_function: 1.0
|
| 64 |
+
max_num_iterations: 200
|
| 65 |
+
|
| 66 |
+
Triangulation:
|
| 67 |
+
complete_max_reproj_error: 15.0
|
| 68 |
+
merge_max_reproj_error: 15.0
|
| 69 |
+
min_angle: 1.0
|
| 70 |
+
min_num_matches: 15
|
| 71 |
+
|
| 72 |
+
Thresholds:
|
| 73 |
+
max_epipolar_error_E: 1.0
|
| 74 |
+
max_epipolar_error_F: 4.0
|
| 75 |
+
max_epipolar_error_H: 4.0
|
| 76 |
+
min_inlier_num: 30.0
|
| 77 |
+
min_inlier_ratio: 0.25
|
| 78 |
+
max_rotation_error: 10.0
|