Skip to content
Snippets Groups Projects
Commit 561efec1 authored by tee1g21's avatar tee1g21
Browse files

Added upload check

parent 2cd7b157
No related branches found
No related tags found
1 merge request!54.2.2 depth chbox
...@@ -41,7 +41,13 @@ def select_Image(event): ...@@ -41,7 +41,13 @@ def select_Image(event):
label.configure(text="Image is selected. Press run to create scene.") label.configure(text="Image is selected. Press run to create scene.")
def depthmap_creation(): def depthmap_creation():
print("Upload Depth Map: ", check.get()) print("Manually upload depth map: ", uploadDepthCheck.get())
if uploadDepthCheck == 0:
check.set(1)
else:
check.set(0) #temporary. TODO implement Mona's monodepth upload
def stanfordRoom_selection(): def stanfordRoom_selection():
if checkStanford.get() == 1: if checkStanford.get() == 1:
...@@ -87,6 +93,11 @@ def runProcess(): ...@@ -87,6 +93,11 @@ def runProcess():
print(f"Attempting to run: {combined_bat}") print(f"Attempting to run: {combined_bat}")
print(f"With arguments: {file_path}, {str(check.get())}, {include_top_option}, {shift_image_option}") print(f"With arguments: {file_path}, {str(check.get())}, {include_top_option}, {shift_image_option}")
if check == 1:
print("Autodepth map")
else:
print("Manual depth map")
p = subprocess.Popen( p = subprocess.Popen(
[combined_bat, file_path, str(check.get()), include_top_option, shift_image_option], [combined_bat, file_path, str(check.get()), include_top_option, shift_image_option],
stdout=sys.stdout) stdout=sys.stdout)
...@@ -125,7 +136,13 @@ def threading(): ...@@ -125,7 +136,13 @@ def threading():
window = tk.Tk() window = tk.Tk()
window.title("Immersive VR scene creator") window.title("Immersive VR scene creator")
check = tk.IntVar() check = tk.IntVar()
check.set(1) #automatically generate depth map as default
# changed check 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()
shift_image = tk.IntVar() shift_image = tk.IntVar()
...@@ -152,7 +169,7 @@ run_button = tk.Button( ...@@ -152,7 +169,7 @@ run_button = tk.Button(
bg="green", bg="green",
fg="white", fg="white",
) )
depth_check = tk.Checkbutton(window, text='Upload a depth map(360 MonoDepth)',variable=check, onvalue=1, offvalue=0, command=depthmap_creation) depth_check = tk.Checkbutton(window, text='Upload a depth map(360 MonoDepth)',variable=uploadDepthCheck, onvalue=1, offvalue=0, command=depthmap_creation)
stanford_check = tk.Checkbutton(window, text='Run for stanford2D3D dataset',variable=checkStanford, onvalue=1, offvalue=0,command=stanfordRoom_selection ) stanford_check = tk.Checkbutton(window, text='Run for stanford2D3D dataset',variable=checkStanford, onvalue=1, offvalue=0,command=stanfordRoom_selection )
include_top_check = tk.Checkbutton(window, text='Include Top in Mesh', variable=include_top, onvalue=1, offvalue=0) include_top_check = tk.Checkbutton(window, text='Include Top in Mesh', variable=include_top, onvalue=1, offvalue=0)
shift_image_check = tk.Checkbutton(window, text='Shift input image', variable=shift_image, onvalue=1, offvalue=0, command=shift_image_selection) shift_image_check = tk.Checkbutton(window, text='Shift input image', variable=shift_image, onvalue=1, offvalue=0, command=shift_image_selection)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment