I am currently trying to let users pick a camera for our front end software. We currently iterate through the camera devices like shown in this answer on StackOverflow. This will return us the Camera IDs:
index = 0
arr = []
while True:
cap = cv2.VideoCapture(index)
if not cap.read()[0]:
break
else:
arr.append(index)
cap.release()
index += 1
return arr
which is fine, but it would be a lot better to get a friendly device name to show the user i.e: Logitech Webcam
Does anyone know how to get the actual names of these cameras to show to the users rather than displaying with IDs?