Horje
read video with opencv Code Example
how to read video in opencv python
import numpy as np
import cv2
cap = cv2.VideoCapture('videos/wa.avi')
while(cap.isOpened()):
  ret, frame = cap.read()
  gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
  cv2.imshow('frame',gray)
  if cv2.waitKey(1) & 0xFF == ord('q'):
    break

cap.release()
cv2.destroyAllWindows()
read video with opencv
import cv2
frameWidth = 640
frameHeight = 480
cap = cv2.VideoCapture("Resources/test_ video.mp4")
while True:
    success, img = cap.read()
    img = cv2.resize(img, (frameWidth, frameHeight))
    cv2.imshow("Result", img)
    if cv2.waitKey(1) and 0xFF == ord('q'):
         break




Python

Related
how to install python pip in ubuntu Code Example how to install python pip in ubuntu Code Example
how to place image in tkinter Code Example how to place image in tkinter Code Example
how to change number of steps in tensorflow object detection api Code Example how to change number of steps in tensorflow object detection api Code Example
reversed() python Code Example reversed() python Code Example
chromebook install pip Code Example chromebook install pip Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7