Not getting frames from external camera

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.

Even when i use this command it shows pipeline failed to create.
command:— nvgstcapture-1.0 --camsrc=0 --cap-dev-node=0

Do you integrate the driver for it?
Check below document for driver implement.

https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/SD/CameraDevelopment/SensorSoftwareDriverProgramming.html#camera-sensor-drivers-porting

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.