mirror of
https://github.com/NohamR/Stage-2023.git
synced 2026-01-09 23:58:18 +00:00
changes
This commit is contained in:
0
detec/open.py
Normal file
0
detec/open.py
Normal file
15
detec/test.py
Normal file
15
detec/test.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import numpy as np
|
||||
import cv2 as cv
|
||||
cap = cv.VideoCapture('cams/10s.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