-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautomatic.py
More file actions
40 lines (31 loc) · 1005 Bytes
/
automatic.py
File metadata and controls
40 lines (31 loc) · 1005 Bytes
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
import os
import sys
import kgui.main as gui
import stitching
import argparse
# Arguments
parser = argparse.ArgumentParser(description="",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
add_arg = parser.add_argument
add_arg('--gui', action='store_true', help="Launch the GUI.")
add_arg('--test', action="store_true", help="Run in test mode (not acturally grabbing images from a Mantis Camera).")
args = parser.parse_args()
# Color coded output helps visualize the information a little better, plus looks cool!
class ansi:
BOLD = '\033[1;97m'
WHITE = '\033[0;97m'
YELLOW = '\033[0;33m'
YELLOW_B = '\033[0;33m'
RED = '\033[0;31m'
RED_B = '\033[1;31m'
BLUE = '\033[0;94m'
BLUE_B = '\033[1;94m'
CYAN = '\033[0;36m'
CYAN_B = '\033[1;36m'
ENDC = '\033[0m'
if args.gui:
string = "\n{}Launching GUI\n"
print(string.format(ansi.RED_B))
gui.main(test=True)
if args.test:
stitching.stitching_pure_hugin()