-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscratch.txt
More file actions
28 lines (24 loc) · 1.04 KB
/
Copy pathscratch.txt
File metadata and controls
28 lines (24 loc) · 1.04 KB
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
# create switch for ON/OFF predictor text functionality
img = np.zeros((300,512,3), np.uint8)
switch = '0 : OFF : ON'
#Parameters: LabelforTrackbar, Window, Minimum Value, Max Value, callback(function that will be called whenever value changes)
cv2.createTrackbar(switch, 'ASL Translation App',0,1,nothing)
s = cv2.getTrackbarPos(switch,'ASL Translation App')
#If switch is on then execute predictor text file.
if s == 1:
exec(open('markov_nextwordpred.py').read())
img[:] = 1
print("Somethin' happenings!")
else:
img[:] = 0
if keypress == ord('t'):
#exec(open('markov_nextwordpred.py').read())
os.system('python Gesture_Recognize_sign.py &')
os.system('python markov_nextwordpred.py &')
if __name__ == '__main__':
for file in ('markov_nextwordpred'):
p = multiprocessing.Process(target=lambda __import__: file)
p.start()
for output in process.stdout:
#output is constantly being changed.
sys.stdout.write(output)