new file: helloworld.py

deleted:    nst/1.jpg
	deleted:    nst/img/gui.gif
	deleted:    nst/img/gui.jpg
	new file:   "nst/\351\241\271\347\233\256\346\212\245\345\221\212.pdf"
master
shawn-sheep 2 years ago
parent df56c9b8d4
commit 33be979d2c

@ -0,0 +1,15 @@
import cv2
def detect_cameras(max_cameras=10):
cameras = []
for i in range(max_cameras):
cap = cv2.VideoCapture(i)
if cap is None or not cap.isOpened():
cap.release()
else:
cameras.append(i)
cap.release()
return cameras
available_cameras = detect_cameras()
print(f'Found {len(available_cameras)} camera(s): {available_cameras}')

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.
Loading…
Cancel
Save