an meinem PC sind zwei USB Kameras angeschlossen.
Ich möchte die Helligkeit- und Kontrast-Werte im Python-Konsolenfenster ausgeben lassen.
-Dies klappt einwandfrei. -Jedoch erscheint zweimal folgende Fehlermeldung :
Code: Alles auswählen
[ Warn:0] terminating async callback
ohne die Fehlermeldung zu bekommen?
PS:
Um cv2 nutzen zu können, muss man es zuvor installieren, mit dem Befehl . .
python -m pip install opencv-python
Code: Alles auswählen
import cv2
import time
# - - - - - - - - - - - - - - - - -
time.sleep(1.5)
c0 = cv2.VideoCapture(0)
print('Device 0: Bri. ' + str(int(c0.get(10))))
print('Device 0: Con. ' + str(int(c0.get(11))))
print('Device 0: Saturation ' + str(int(c0.get(12))))
print('Device 0: Gamma ' + str(int(c0.get(22))))
print('Device 0: Hue ' + str(int(c0.get(13))))
print
c0.release()
# - - - - - - - - - - - - - - - - -
time.sleep(1.5)
c1 = cv2.VideoCapture(1)
print('Device 1: Bri. ' + str(int(c1.get(10))))
print('Device 1: Con. ' + str(int(c1.get(11))))
print('Device 1: Saturation ' + str(int(c1.get(12))))
print('Device 1: Gamma ' + str(int(c1.get(22))))
print('Device 1: Hue ' + str(int(c1.get(13))))
print
c1.release()
# - - - - - - - - - - - - - - - - -
time.sleep(1.5)