|
|
@@ -12,6 +12,31 @@ rows = image.shape[0] #Auslesen der Zeilenanzahl |
|
|
|
cols = image.shape[1] #Auslesen der Spaltenanzahl
|
|
|
|
kanaele = image.shape[2] #Auslesen der Kanaele (3 fuer RGB, 1 fuer Graubild)
|
|
|
|
|
|
|
|
'''
|
|
|
|
0.4124564 0.3575761 0.1804375 Transformationsmatrix fuer XYZ Werte aus gegebenen RGB Werten!
|
|
|
|
RGB2XYZ = 0.2126729 0.7151522 0.0721750
|
|
|
|
0.0193339 0.1191920 0.9503041
|
|
|
|
'''
|
|
|
|
|
|
|
|
RGB2XYZ = np.array([[0.4124564,0.3575761,0.1804375],[0.2126729,0.7151522,0.0721750],[0.0193339,0.1191920,0.9503041]])
|
|
|
|
|
|
|
|
'''
|
|
|
|
3.2404542 -1.5371385 -0.4985314 Transformationsmatrix fuer RGB Werte aus gegebenen XYZ Werten!
|
|
|
|
XYZ2RGB = -0.9692660 1.8760108 0.0415560 (RGB nur ganzzahlig --> Runden!!)
|
|
|
|
0.0556434 -0.2040259 1.0572252
|
|
|
|
'''
|
|
|
|
|
|
|
|
XYZ2RGB = np.array([[3.2404542,-1.5371385,-0.4985314],[-0.9692660,1.8760108,0.0415560],[0.0556434,-0.2040259,1.0572252]])
|
|
|
|
|
|
|
|
'''
|
|
|
|
0.4002 0.7076 −0.0808 Transformationsmatrix fuer LMS Werte aus gegebenen XYZ Werten
|
|
|
|
M_HPE = −0.2263 1.1653 0.0457
|
|
|
|
0 0 0.9182
|
|
|
|
'''
|
|
|
|
|
|
|
|
M_HPE = np.array([[0.4002,0.7076,-0.0808],[-0.2263,1.1653,0.0457],[0,0,0.9182]])
|
|
|
|
|
|
|
|
|
|
|
|
# for i in range(rows): #Durchgehen aller Pixel des Bildes
|
|
|
|
# for j in range(cols):
|
|
|
|
# k = image[i,j]
|