-
Notifications
You must be signed in to change notification settings - Fork 1
/
main_cli.py
43 lines (35 loc) · 1.26 KB
/
main_cli.py
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
import os
import sys
import shutil
dirName = ''
if __name__ == "__main__":
# For GUI: will get rid of all of this
if (len(sys.argv) > 1):
dirName = "dataset/" + sys.argv[1]
if not os.path.exists(dirName):
os.mkdir(dirName)
os.makedirs(dirName + "/depth")
os.makedirs(dirName + "/color")
print("\nDirectory '{}' Created ".format(dirName))
else:
print("\nDirectory '{}' already exists... ".format(dirName))
yn = raw_input("\nOverwrite? (Y/N): ")
if(yn.lower() == "y"):
shutil.rmtree(dirName)
os.makedirs(dirName)
os.makedirs(dirName + "/depth")
os.makedirs(dirName + "/color")
else:
print("\n\nExiting...")
exit()
else:
print("\nGive a new directory name... Exiting")
exit()
print("dirName: {}".format(dirName))
from capture_test import *
main_capture(dirName)
from run_system import *
main_register_capture(dirName)
from view import *
main_view_cloud("{}/scene/integrated.ply".format(dirName))
main_view_mesh("{}/scene/integrated.ply".format(dirName))