The usual way to create a video capture is as follows:
cam = cv2.VideoCapture(n)
where n corresponds to the number /dev/video0,dev/video1
But since I am building a robot that uses several cameras for different things, I had to make sure that it was assigned to the correct camera, I created udev rules that created devices with symbolic links to the correct port whenever a certain camera was connected.
They work because when I look in a directory /dev, I see a link:
/dev/front_cam -> video1
However, I'm not sure how to actually use it now.
I thought I could just open it from the file name, as if it were a video, but it cam = cv2.VideoCapture('/dev/front_cam')doesnβt work.
Also cv2.VideoCapture('/dev/video1')
, VideoCapture, , (cam.isOpened() False).