-
Notifications
You must be signed in to change notification settings - Fork 1
/
AddExtraPoints.py
51 lines (36 loc) · 996 Bytes
/
AddExtraPoints.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
import os
import cv2
import time
path = 'E:/Capstone Project/New Video For Journal/4_AddExtraPoints/ThresholdDyn/'
dirs = os.listdir( path )
height = 720
width = 1280
start = time.time()
for file in dirs:
file = open(path + file,'a')
line1 = 0
line2 = 0
file.write("%d %d\n" % (line1 , line2))
line1 = width/2
line2 = 0
file.write("%d %d\n" % (line1 , line2))
line1 = width-1
line2 = 0
file.write("%d %d\n" % (line1 , line2))
line1 = width-1
line2 = height/2
file.write("%d %d\n" % (line1 , line2))
line1 = width-1
line2 = height-1
file.write("%d %d\n" % (line1 , line2))
line1 = width/2
line2 = height-1
file.write("%d %d\n" % (line1 , line2))
line1 = 0
line2 = height-1
file.write("%d %d\n" % (line1 , line2))
line1 = 0
line2 = height/2
file.write("%d %d\n" % (line1 , line2))
file.close()
print ('Total Time Taken:' , time.time()-start)