Initial commit with project files

This commit is contained in:
2025-06-27 14:34:11 +02:00
commit 7ea3207e63
310 changed files with 9331 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
import numpy as np
import cv2
camera = cv2.VideoCapture(0)
signum = 1
factor = 0.3
while True:
ret, bgr = camera.read()
''' Aufgabe a) '''
hsv = cv2.cvtColor(bgr, cv2.COLOR_BGR2HSV)
hsv[:, :, 2] = np.round(hsv[:, :, 2] * factor)
bgr = cv2.cvtColor(hsv, cv2.COLOR_HSV2BGR)
''' Aufgabe b) '''
if factor == 0:
signum = 1
elif factor == 1:
signum = -1
factor += signum * 0.02
factor = min(1, factor)
factor = max(0, factor)
''' Visualisierung '''
# Display the resulting frame
cv2.imshow('frame', bgr)
if 27 == cv2.waitKey(1): # Taste "q"
break
# When everything done, release the capture
camera.release()
cv2.destroyAllWindows()