going in the right direction.
This commit is contained in:
1 parent
b69b33ee59
commit
d716ba80f7
4 files changed
+135
-3
No files matched your search
@@ -1,5 +1,19 @@
|
||||
import cv2 as cv
|
||||
img = cv.imread("/Users/didier/ahuntsic/cours-420-301-ah/cours/images/json/001.jpg")
|
||||
|
||||
cv.imshow("Display window", img)
|
||||
k = cv.waitKey(0) # Wait for a keystroke in the window
|
||||
minute = 60
|
||||
video_start = 9 * minute + 30
|
||||
video_end = 12 * minute + 56
|
||||
|
||||
cap = cv.VideoCapture('out.mp4')
|
||||
while cap.isOpened():
|
||||
ret, frame = cap.read()
|
||||
# if frame is read correctly ret is True
|
||||
if not ret:
|
||||
print("Can't receive frame (stream end?). Exiting ...")
|
||||
break
|
||||
gray = cv.cvtColor(frame, cv.COLOR_BGR2GRAY)
|
||||
cv.imshow('frame', gray)
|
||||
if cv.waitKey(1) == ord('q'):
|
||||
break
|
||||
cap.release()
|
||||
cv.destroyAllWindows()
|
||||
Reference in new issue
Block a user