Simulationsmatrizen der einzelnen Fehlsichtigkeiten implementiert
Simulationsmatrizen fuer Protanopie, Deuteranopie und Tritanopie hinzugefügt.
This commit is contained in:
parent
7c4a08521f
commit
c3d4a04017
@ -22,6 +22,7 @@ def gammaCorrection(v):
|
|||||||
print("Ungültiger Wert!!")
|
print("Ungültiger Wert!!")
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
|
||||||
def reverseGammaCorrection(v_reverse):
|
def reverseGammaCorrection(v_reverse):
|
||||||
if v_reverse <= 0.0031308:
|
if v_reverse <= 0.0031308:
|
||||||
return int(255 * (12.92 * v_reverse))
|
return int(255 * (12.92 * v_reverse))
|
||||||
@ -66,7 +67,23 @@ for i in range(rows):
|
|||||||
for j in range(cols):
|
for j in range(cols):
|
||||||
cb_image[i, j] = T.dot(cb_image[i, j])
|
cb_image[i, j] = T.dot(cb_image[i, j])
|
||||||
|
|
||||||
#Simulationsmatrizen
|
# Simulationsmatrizen fuer Protanop
|
||||||
|
|
||||||
|
S_b = np.array([[0, 1.05118294, -0.05116099], #Simulationsmatrix fuer Protanopie
|
||||||
|
[0, 1, 0],
|
||||||
|
[0, 0, 1]])
|
||||||
|
|
||||||
|
S_d = np.array([[1, 0, 0], #Simulationsmatrix fuer Deuteranopie
|
||||||
|
[0.9513092, 0, 0.04866992],
|
||||||
|
[0, 0, 1]])
|
||||||
|
|
||||||
|
S_t = np.array([[1, 0, 0], #Simulationsmatrix fuer Tritanopie
|
||||||
|
[0, 1, 0],
|
||||||
|
[-0.86744736, 1.86727089, 0]])
|
||||||
|
|
||||||
|
#choice = input("Bitte geben Sie den Typ der zu simulierenden Farbblindheit an:(B,D,T)")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cv2.namedWindow("Display") # Displaywindow erstellen
|
cv2.namedWindow("Display") # Displaywindow erstellen
|
||||||
|
Loading…
x
Reference in New Issue
Block a user