-
Notifications
You must be signed in to change notification settings - Fork 0
/
signGUI_main.py
81 lines (54 loc) · 2.51 KB
/
signGUI_main.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
76
77
78
79
80
81
import sqlite3
import tkinter as tk
from tkinter import *
import time
import numpy as np
import os
from PIL import Image # For face recognition we will the the LBPH Face Recognizer
from PIL import Image , ImageTk
root = tk.Tk()
w, h = root.winfo_screenwidth(), root.winfo_screenheight()
root.geometry("%dx%d+0+0" % (w, h))
root.title("Sign Language Detection")
# 43
# ++++++++++++++++++++++++++++++++++++++++++++
#####For background Image
image2 = Image.open("finalbg.jpg")
image2 = image2.resize((w,h), Image.ANTIALIAS)
background_image = ImageTk.PhotoImage(image2)
background_label = tk.Label(root, image=background_image)
background_label.image = background_image
background_label.place(x=0, y=0) # , relwidth=1, relheight=1)
#
label_l1 = tk.Label(root, text="SSTI",font=("Open Sans", 35, 'bold'),
background="#f3f4ed", fg="#424642", width=45, height=2)
label_l1.place(x=0, y=30)
#T1.tag_configure("center", justify='center')
#T1.tag_add("center", 1.0, "end")
################################$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#def clear_img():
# img11 = tk.Label(root, background='bisque2')
# img11.place(x=0, y=0)
#################################################################$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
################################$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
# def cap_video():
# video1.upload()
# #from subprocess import call
# #call(['python','video_second.py'])
def reg():
from subprocess import call
call(["python","recognize_gesture.py"])
def log():
from subprocess import call
call(["python","text_to_sign.py"])
def window():
root.destroy()
button1 = tk.Button(root, text="Sign To Text", command=reg, width=18, height=1,font=('Open Sans', 20, ' bold '), bg="#424642", fg="white")
button1.place(x=130, y=200)
#button2 = tk.Button(root, text="Text/Calculator Mode",command=log,width=18, height=1,font=('Curlz MT', 20, ' bold '), bg="#0000A0", fg="white")
#button2.place(x=130, y=300)
button4 = tk.Button(root, text="Text To Sign",command=log,width=18, height=1,font=('Open Sans', 20, ' bold '), bg="#424642", fg="white")
button4.place(x=130, y=300)
button3 = tk.Button(root, text="Exit", command=window, width=18, height=1,font=('Open Sans', 20, ' bold '), bg="red", fg="white")
button3.place(x=130, y=500)
root.mainloop()