Hi im using Ubuntu 18.04. Im not getting frames fromexternal camera device from Sony EV9500L. Im trying to read frames in Pycharm IDLE.
code:
import cv2
cap = cv2.VideoCapture(‘/dev/video0’)
while True:
ret, frame = cap.read()
print(ret)
if ret:
cv2.imshow(“vidout”, frame)
cv2.moveWindow(“vidout”, 0, 0)
if cv2.waitkey(1)==ord(‘q’):
break
cap.release()
cv2.destroyAllWindows()
Also when a video file is provided in cv2.VideoCapture(‘cam.avi’) the frames are not displayed in cv2.imshow(“frames”, frame). Please help.