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,19 @@
import cv2
import numpy as np
img = cv2.imread("../../data/model.png")
#white_balancing_factor = np.asarray([[[1, 1, 1]]])
white_balancing_factor = 255 / img[146, 127].astype(np.float32)
white_balancing_factor = np.expand_dims(white_balancing_factor, 0)
white_balancing_factor = np.expand_dims(white_balancing_factor, 1)
img_balanced = img * white_balancing_factor
img_balanced = np.clip(img_balanced, 0, 255)
img_balanced = img_balanced.astype(np.uint8)
cv2.imshow("Normal", img)
cv2.imshow("Abgeglichen", img_balanced)
cv2.waitKey()