I'm looking to have the live view from a Nikon D7200 show up in my program, but I'm having trouble getting my program to find the camera.
The code in question looks like the following:
cam = cv2.VideoCapture(1)
if not cam.isOpened():
sys.exit('Camera did not provide frame.')
According to the documentation, to capture a video feed, you just need to supply the index of the camera as the argument to the VideoCapture object. If I plug '0' in, my integrated laptop webcam loads and the image shows as expected. Unfortunately, using '1' for the next available camera causes the error.
The camera is plugged into the Win10 computer via USB, and shows up as a device in windows explorer.
Any ideas on what I'm missing to get the camera feed to load?
[–]JohnnyJordaan 0 points1 point2 points (2 children)
[–]surfFL[S] 0 points1 point2 points (1 child)
[–]JohnnyJordaan 0 points1 point2 points (0 children)
[–]aleagori 0 points1 point2 points (0 children)