-
Notifications
You must be signed in to change notification settings - Fork 1
/
DistanceModuleFrontalMode.sh
53 lines (53 loc) · 1.72 KB
/
DistanceModuleFrontalMode.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
#!/usr/bin/env python
# conda init bash
cd ./DistanceModuleFrontalMode
results_path=../DistanceModuleFrontalModeResults
LOG=$results_path/log.txt
exec >> >(tee $LOG)
sudo rm -rf images
mkdir -m 777 images/
echo "Extracting images from video"
python3 ../utils/VideoToImage.py --video $1
echo "Done!!"
cd ..
echo "COLMAP Started"
DATASET_PATH=./DistanceModuleFrontalMode #can change it depending on where to keep the bash script.
colmap feature_extractor \
--database_path $DATASET_PATH/database.db \
--image_path $DATASET_PATH/images
colmap exhaustive_matcher \
--database_path $DATASET_PATH/database.db
mkdir -m 777 $DATASET_PATH/sparse
colmap mapper \
--database_path $DATASET_PATH/database.db \
--image_path $DATASET_PATH/images \
--output_path $DATASET_PATH/sparse
mkdir -m 777 $DATASET_PATH/dense
colmap image_undistorter \
--image_path $DATASET_PATH/images \
--input_path $DATASET_PATH/sparse/0 \
--output_path $DATASET_PATH/dense \
--output_type COLMAP \
--max_image_size 2000
colmap patch_match_stereo \
--workspace_path $DATASET_PATH/dense \
--workspace_format COLMAP \
--PatchMatchStereo.geom_consistency true
colmap stereo_fusion \
--workspace_path $DATASET_PATH/dense \
--workspace_format COLMAP \
--input_type geometric \
--output_path $DATASET_PATH/dense/fused.ply
colmap poisson_mesher \
--input_path $DATASET_PATH/dense/fused.ply \
--output_path $DATASET_PATH/dense/meshed-poisson.ply
colmap delaunay_mesher \
--input_path $DATASET_PATH/dense \
--output_path $DATASET_PATH/dense/meshed-delaunay.ply
echo "Done!!"
cd ./DistanceModuleFrontalMode
echo "Calculations Started"
chmod +x FrontalMode.py
python3 FrontalMode.py --logpath $2
echo "Done!!"