Update COLMAP integration for 4.1.0: add GLOMAP mapper
#2
by cllim118 - opened
- colmap_mapper.sh +21 -10
colmap_mapper.sh
CHANGED
|
@@ -8,6 +8,7 @@ settings_yaml="$4"
|
|
| 8 |
calibration_yaml="$5"
|
| 9 |
rgb_csv="$6"
|
| 10 |
camera_name="$7"
|
|
|
|
| 11 |
|
| 12 |
exp_folder_colmap="${exp_folder}/colmap_${exp_id}"
|
| 13 |
rgb_dir="${camera_name}"
|
|
@@ -25,19 +26,29 @@ then
|
|
| 25 |
ba_refine_extra_params="1"
|
| 26 |
fi
|
| 27 |
|
| 28 |
-
echo " colmap mapper ..."
|
| 29 |
database="${exp_folder_colmap}/colmap_database.db"
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
echo " colmap model_converter ..."
|
| 40 |
colmap model_converter \
|
| 41 |
--input_path ${exp_folder_colmap}/0 --output_path ${exp_folder_colmap} --output_type TXT
|
| 42 |
-
|
| 43 |
-
|
|
|
|
| 8 |
calibration_yaml="$5"
|
| 9 |
rgb_csv="$6"
|
| 10 |
camera_name="$7"
|
| 11 |
+
mapper_type="$8"
|
| 12 |
|
| 13 |
exp_folder_colmap="${exp_folder}/colmap_${exp_id}"
|
| 14 |
rgb_dir="${camera_name}"
|
|
|
|
| 26 |
ba_refine_extra_params="1"
|
| 27 |
fi
|
| 28 |
|
|
|
|
| 29 |
database="${exp_folder_colmap}/colmap_database.db"
|
| 30 |
|
| 31 |
+
if [ "${mapper_type}" == "glomap" ]
|
| 32 |
+
then
|
| 33 |
+
echo " global mapper (GLOMAP) ..."
|
| 34 |
+
colmap global_mapper \
|
| 35 |
+
--database_path ${database} \
|
| 36 |
+
--image_path ${rgb_path} \
|
| 37 |
+
--output_path ${exp_folder_colmap} \
|
| 38 |
+
--GlobalMapper.ba_refine_focal_length ${ba_refine_focal_length} \
|
| 39 |
+
--GlobalMapper.ba_refine_principal_point ${ba_refine_principal_point} \
|
| 40 |
+
--GlobalMapper.ba_refine_extra_params ${ba_refine_extra_params}
|
| 41 |
+
else
|
| 42 |
+
echo " colmap mapper (COLMAP) ..."
|
| 43 |
+
colmap mapper \
|
| 44 |
+
--database_path ${database} \
|
| 45 |
+
--image_path ${rgb_path} \
|
| 46 |
+
--output_path ${exp_folder_colmap} \
|
| 47 |
+
--Mapper.ba_refine_focal_length ${ba_refine_focal_length} \
|
| 48 |
+
--Mapper.ba_refine_principal_point ${ba_refine_principal_point} \
|
| 49 |
+
--Mapper.ba_refine_extra_params ${ba_refine_extra_params}
|
| 50 |
+
fi
|
| 51 |
|
| 52 |
echo " colmap model_converter ..."
|
| 53 |
colmap model_converter \
|
| 54 |
--input_path ${exp_folder_colmap}/0 --output_path ${exp_folder_colmap} --output_type TXT
|
|
|
|
|
|