Skip to content

Commit

Permalink
Shippable ready
Browse files Browse the repository at this point in the history
  • Loading branch information
dario-loi committed Jan 5, 2023
1 parent 3ac921c commit 49adc5f
Show file tree
Hide file tree
Showing 32 changed files with 63 additions and 1,019 deletions.
12 changes: 7 additions & 5 deletions gui/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))

OUTPUT_PATH = Path(__file__).parent
ASSETS_PATH = OUTPUT_PATH / Path(r"elements")
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 ASSETS_PATH / Path(path)
return os.path.join(ASSETS_PATH, Path(path))


def upload_file():
Expand Down Expand Up @@ -49,13 +49,15 @@ 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=2, 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")))

if HDR is not None:
cv2.imwrite(path, HDR)
Expand Down
13 changes: 9 additions & 4 deletions gui/image_slider.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import tkinter as tk
from PIL import Image, ImageTk
import os


class Application(tk.Frame):
Expand All @@ -15,21 +16,25 @@ def create_slider(self):
screemWidth = 500
# CREATING IMAGES

file_dir = os.path.abspath(os.path.dirname(__file__))

FILL_FACTOR = 1.50
size = (int(730 * FILL_FACTOR), int(410 * FILL_FACTOR))
self.img1 = ImageTk.PhotoImage(Image.open(
"gui/elements/hdr_image.png").resize(size))
os.path.join(file_dir, "elements", "hdr_image.png")).resize(size))
self.canv1 = tk.Canvas(self, width=500, height=600,
highlightthickness=0, bd=0)
self.canv1.grid(row=0, column=0, sticky="nsew")
self.canv1.create_image(500/2, 600/2, image=self.img1, anchor="center")
self.canv1.create_image(
500/2, 600/2, image=self.img1, anchor="center")

self.img2 = ImageTk.PhotoImage(Image.open(
"gui/elements/ldr_image.png").resize(size))
os.path.join(file_dir, "elements", "ldr_image.png")).resize(size))
self.canv2 = tk.Canvas(self, width=500, height=600,
highlightthickness=0, bd=0)
self.canv2.grid(row=0, column=0, sticky="nsw")
self.canv2.create_image(500/2, 600/2, image=self.img2, anchor="center")
self.canv2.create_image(
500/2, 600/2, image=self.img2, anchor="center")

self.line = self.canv2.create_line(500/2, 0, 500/2, 600,
width=4, fill="white")
Expand Down
4 changes: 4 additions & 0 deletions presentation/presentation.bbl
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,8 @@ H.~Bay, T.~Tuytelaars, and L.~Van~Gool, ``Surf: Speeded up robust features,''
A.~Pinz, Eds.\hskip 1em plus 0.5em minus 0.4em\relax Berlin, Heidelberg:
Springer Berlin Heidelberg, 2006, pp. 404--417.

\bibitem{hessel:exp_fusion}
C.~Hessel, ``{Extended Exposure Fusion},'' \emph{{Image Processing On Line}},
vol.~9, pp. 453--468, 2019, \url{https://doi.org/10.5201/ipol.2019.278}.

\end{thebibliography}
64 changes: 32 additions & 32 deletions presentation/presentation.blg
Original file line number Diff line number Diff line change
Expand Up @@ -17,45 +17,45 @@ Warning--empty booktitle in stanford:exposure_fusion
Warning--empty booktitle in ICCV:ORB

Done.
You've used 5 entries,
You've used 6 entries,
4087 wiz_defined-function locations,
860 strings with 8211 characters,
and the built_in function-call counts, 4453 in all, are:
= -- 328
> -- 100
< -- 41
+ -- 57
- -- 15
* -- 221
:= -- 622
add.period$ -- 12
call.type$ -- 5
change.case$ -- 7
chr.to.int$ -- 108
cite$ -- 7
duplicate$ -- 300
empty$ -- 381
format.name$ -- 19
if$ -- 1041
867 strings with 8350 characters,
and the built_in function-call counts, 5311 in all, are:
= -- 407
> -- 112
< -- 51
+ -- 65
- -- 16
* -- 260
:= -- 755
add.period$ -- 14
call.type$ -- 6
change.case$ -- 9
chr.to.int$ -- 132
cite$ -- 8
duplicate$ -- 359
empty$ -- 441
format.name$ -- 20
if$ -- 1241
int.to.chr$ -- 0
int.to.str$ -- 5
missing$ -- 51
newline$ -- 40
num.names$ -- 7
pop$ -- 137
int.to.str$ -- 6
missing$ -- 59
newline$ -- 43
num.names$ -- 8
pop$ -- 149
preamble$ -- 1
purify$ -- 0
quote$ -- 2
skip$ -- 331
skip$ -- 400
stack$ -- 0
substring$ -- 257
swap$ -- 246
text.length$ -- 5
substring$ -- 316
swap$ -- 299
text.length$ -- 7
text.prefix$ -- 0
top$ -- 5
type$ -- 5
type$ -- 6
warning$ -- 2
while$ -- 20
width$ -- 6
write$ -- 69
while$ -- 25
width$ -- 7
write$ -- 80
(There were 2 warnings)
10 changes: 7 additions & 3 deletions presentation/presentation.fls
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PWD D:\Documents\Cdev\threads\CGProj-Loi-Gezzi\presentation
PWD D:\Repos\CGProj\presentation
INPUT C:\Users\candi\AppData\Local\MiKTeX\miktex\data\le\pdftex\pdflatex.fmt
INPUT d:\Documents\Cdev\threads\CGProj-Loi-Gezzi\presentation\presentation.tex
INPUT d:\Repos\CGProj\presentation\presentation.tex
OUTPUT presentation.log
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\tex\latex\ieeetran\IEEEtran.cls
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\tex\latex\ieeetran\IEEEtran.cls
Expand Down Expand Up @@ -790,6 +790,10 @@ INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\tex\latex\hyperref\pd1enc.def
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\tex\latex\hyperref\pd1enc.def
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\tex\latex\hyperref\pd1enc.def
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\tex\latex\hyperref\pd1enc.def
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\tex\latex\hyperref\hyperref-langpatches.def
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\tex\latex\hyperref\hyperref-langpatches.def
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\tex\latex\hyperref\hyperref-langpatches.def
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\tex\latex\hyperref\hyperref-langpatches.def
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\tex\generic\intcalc\intcalc.sty
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\tex\generic\intcalc\intcalc.sty
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\tex\generic\intcalc\intcalc.sty
Expand Down Expand Up @@ -1140,7 +1144,7 @@ INPUT .\figures\out_2.png
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\fonts\tfm\adobe\helvetic\phvr7t.tfm
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\fonts\vf\adobe\helvetic\phvr7t.vf
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\fonts\tfm\adobe\helvetic\phvr8r.tfm
INPUT C:\Users\candi\AppData\Local\MiKTeX\fonts\map\pdftex\pdftex.map
INPUT C:\Users\candi\AppData\Local\MiKTeX\pdftex\config\pdftex.map
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\fonts\vf\adobe\helvetic\phvr7t.vf
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\fonts\tfm\adobe\helvetic\phvr8r.tfm
INPUT C:\Users\candi\AppData\Local\Programs\MiKTeX\fonts\vf\adobe\helvetic\phvr7t.vf
Expand Down
Binary file removed presentation/presentation.pdf
Binary file not shown.
5 changes: 3 additions & 2 deletions presentation/presentation.tex
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
\IEEEauthorblockN{Dario Loi}
\IEEEauthorblockA{(1940849)},
\IEEEauthorblockN{Flavio Gezzi}
\IEEEauthorblockA{(???)}
\IEEEauthorblockA{(1958690)}
}

\IEEEcompsoctitleabstractindextext{%
Expand Down Expand Up @@ -244,7 +244,8 @@ \section{Risultati}
É infatti noto agli autori originali che il metodo
presenta degli artefatti a bassa frequenza quando la profondita delle piramidi Gaussiane e Laplaciane é troppo
bassa, questo problema é risolvibile aumentando la profonditá, cio peró aumenta il tempo di computazione e
puó risultare in un secondo tipo di artefatto, in cui i valori di intensitá non sono piú presenti nell'intervallo $(0, 1]$.
puó risultare in un secondo tipo di artefatto, in cui i valori di intensitá non sono piú presenti nell'intervallo $(0, 1]$,
questo problema é risolto da metodi piú recenti\cite{hessel:exp_fusion}, ma rimane nella nostra implentazione.

\section{Conclusioni}

Expand Down
2 changes: 1 addition & 1 deletion presentation/ref.bib
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ @inproceedings{stanford:exposure_fusion
url = {https://web.stanford.edu/class/cs231m/project-1/exposure-fusion.pdf}
}

@article{hessel:ext_fusion,
@article{hessel:exp_fusion,
title = {{Extended Exposure Fusion}},
author = {Hessel, Charles},
journal = {{Image Processing On Line}},
Expand Down
Binary file added to_ship.7z
Binary file not shown.
Loading

0 comments on commit 49adc5f

Please sign in to comment.