-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrskfinal.py
More file actions
43 lines (29 loc) · 843 Bytes
/
Copy pathrskfinal.py
File metadata and controls
43 lines (29 loc) · 843 Bytes
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
import time
import cv2 as cv
import numpy as np
import os
def rskIndex(rsk_image_analysis):
data = np.genfromtxt('data.csv', delimiter=',')
# print(data)
while(True):
vid = cv.VideoCapture('chicken.mp4')
i=0
state=0
while(vid.isOpened() and i<200):
ret, frame = vid.read()
gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY)
cv.imshow('object_tracking',frame)
rsk_image_analysis[0] = data[i,0]
rsk_image_analysis[1] = data[i,1]
i += 1
time.sleep(0.17)
ch = cv.waitKey(1)
if ch == 27:
state=1
break
cv.waitKey(1)
vid.release()
if(state==1):
state=0
break
cv.destroyAllWindows()