Skip to content
Snippets Groups Projects
Commit 982dfe05 authored by tee1g21's avatar tee1g21
Browse files

Implemented GUI to upload dpeth map

parent b5944728
No related branches found
No related tags found
1 merge request!54.2.2 depth chbox
...@@ -43,11 +43,21 @@ def select_Image(event): ...@@ -43,11 +43,21 @@ def select_Image(event):
def depthmap_creation(): def depthmap_creation():
print("Manually upload depth map: ", uploadDepthCheck.get()) print("Manually upload depth map: ", uploadDepthCheck.get())
if uploadDepthCheck.get() == 0: if uploadDepthCheck.get() == 1: # if manually upload checked
check.set(1) check.set(0) # disable auto generation of depth map
else: upload_depth_path = tkinter.filedialog.askopenfilename(title="Select a depth map", filetypes=[("All files", "*.*")]) #dialog box to upload dpeth map
check.set(0) #temporary. TODO implement Mona's monodepth upload
if upload_depth_path:
print(f"Uploaded depth map: {upload_depth_path}")
#TODO implement Mona's monodepth upload
else:
print("No depth map selected")
check.set(1) # if no depth map selected, enable auto generation of depth map
depth_check.deselect() # uncheck the depth map check box
else:
check.set(1) # if manually upload unchecked, enable auto generation of depth map
upload_depth_path = None
print("Removed uploaded depth map")
def stanfordRoom_selection(): def stanfordRoom_selection():
if checkStanford.get() == 1: if checkStanford.get() == 1:
...@@ -140,9 +150,7 @@ window.title("Immersive VR scene creator") ...@@ -140,9 +150,7 @@ window.title("Immersive VR scene creator")
check = tk.IntVar() check = tk.IntVar()
check.set(1) #automatically generate depth map as default check.set(1) #automatically generate depth map as default
# changed check vaiable: 0 = automatically upload depth map, 1 = manually upload depth map uploadDepthCheck = tk.IntVar() # added uploadDepthCheck vaiable: 0 = automatically upload depth map, 1 = manually upload depth map
# this behaviour is oppositte to previous check variable
uploadDepthCheck = tk.IntVar()
checkStanford = tk.IntVar() checkStanford = tk.IntVar()
include_top = tk.IntVar() include_top = tk.IntVar()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment