Skip to content

Commit

Permalink
fix gui
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavio0410 committed Jan 5, 2023
1 parent 791aace commit 1088998
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions to_ship/gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
OUTPUT_PATH = Path(__file__).parent
ASSETS_PATH = os.path.join(OUTPUT_PATH, Path(r"elements"))

fuser = ExposureFusion(perform_alignment=True, pyramid_levels=3, sigma=0.2)


def relative_to_assets(path: str) -> Path:
return os.path.join(ASSETS_PATH, Path(path))
Expand Down Expand Up @@ -48,18 +48,19 @@ def delete_file():

def execute_file():

fuser = ExposureFusion(perform_alignment=bool(
var1.get()), pyramid_levels=2, sigma=0.2)
fuser = ExposureFusion(perform_alignment=bool(var1.get()), pyramid_levels=3, sigma=0.2)

images = [cv2.imread(elements) for elements in listbox.get(0, tk.END)]

HDR = fuser(images)

path = fd.asksaveasfilename(initialdir=os.getcwd(), defaultextension=".png",
title="Save HDR image", filetypes=(("PNG", "*.png"), ("JPG", "*.jpg")))
path = fd.asksaveasfilename(initialdir=os.getcwd(), defaultextension=".png",title="Save HDR image", filetypes=(("PNG", "*.png"), ("JPG", "*.jpg"), ("RAW", "*.raw"), ("BMP", "*.bmp"), ("TIFF", "*.tiff")))

if HDR is not None:
cv2.imwrite(path, HDR)
if path is not None:
cv2.imwrite(path, HDR)
else:
showinfo("Error", "No path selected")
return


Expand Down

0 comments on commit 1088998

Please sign in to comment.