-
Notifications
You must be signed in to change notification settings - Fork 1
/
GUI3.py
75 lines (61 loc) · 2.7 KB
/
GUI3.py
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
from tkinter import *
from pylab import arange
from pylab import ones
from pylab import mean
from pylab import gca
from pylab import zeros
from PIL import Image, ImageTk
import cv2
import numpy as np
import tkinter as tk
from tkinter import filedialog
import dlib
import time
from functools import partial
from scipy.interpolate import interp1d
from skimage import color
import sys
import imutils
import apply_makeupCode
import os
class GUI3():
def __init__(self,gui3):
self.gui3 = gui3
self.background_image = ImageTk.PhotoImage(Image.open("./background.png"))
self.background = Label(self.gui3, image=self.background_image)
self.background.pack(fill='both', expand=True)
self.background.image = self.background_image
self.background.bind('<Configure>', self._resize_image)
self.show()
def close(self):
self.gui3.destroy()
def show(self):
title = tk.Label(self.background, text = 'Đồ án Nhập môn thị giác máy tính '
,bg = 'lightskyblue1', font = ("Times New Roman", 15))
title.pack(padx=10, pady=5)
t0 = tk.Label(self.background, text = 'DIGITAL FACE MAKEUP '
,bg = 'lightskyblue1', fg = 'firebrick1', font = ("Times New Roman", 24, "bold"))
t0.pack(padx=10, pady=5)
T2 = tk.Label(self.background, text = 'GVHD: TS. Nguyễn Vinh Tiệp'
,bg = 'lightskyblue1', font = ("Times New Roman", 16, "bold"))
T2.pack(padx=10, pady=5)
T = tk.Label(self.background, text = 'Nhóm thực hiện:\n Đặng Quốc Quy MSSV: 17520960 \n Trần Vũ Hoàng Tú MSSV: 17521209 \n Đặng Hoàng Sang MSSV: 17520967'
,bg = 'lightskyblue1', font = ("Times New Roman", 15, "bold"))
T.pack(padx=10, pady=5)
b = tk.Button(self.background, text = 'Close' ,bg = 'burlywood1', font = ("Times New Roman", 13), command = self.close)
b.pack( padx=10, pady=15 )
def _resize_image(self,event):
new_width = event.width
new_height = event.height
self.background_image = Image.open("./background.png").resize((new_width, new_height))
self.background_image = ImageTk.PhotoImage(self.background_image)
self.background.configure(image = self.background_image)
# if __name__ == "__main__":
# # gui1 = tk.Tk()
# gui3 = Tk() # create gui1 window
# gui3.title("Team Information")
# gui3.minsize(600, 400) # width x height
# main = GUI3(gui3)
# #main.create_left_right_frames()
# gui3.config(bg="lightskyblue1")
# gui3.mainloop()