Commit 4dd27170 authored by Salamandar's avatar Salamandar
Browse files

Set a lower log level when list cameras

parent 2074579b
......@@ -59,6 +59,9 @@ SUSPICIOUS_THRESHOLD = 2
# Get the number of cameras available
def list_available_cameras():
loglevel = cv2.getLogLevel()
cv2.setLogLevel(2)
cameras = []
for i in range(10):
temp_camera = cv2.VideoCapture(i)
......@@ -66,6 +69,7 @@ def list_available_cameras():
temp_camera.release()
cameras.append(i)
cv2.setLogLevel(loglevel)
print("Found cameras:", cameras)
return cameras
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment