OpenCV Read Video and Resize
import cv2
width = 360
height = 240
cap = cv2.VideoCapture("readvideo.mp4")
while True:
success, img = cap.read()
img = cv2.resize(img, (width, height))
cv2.imshow("frame", img)
if cv2.waitKey(1) and 0xFF == ord('q'):
break
Comments
Post a Comment