mirror of
https://github.com/KrisKennaway/ii-vision.git
synced 2025-01-17 10:30:21 +00:00
Fix warnings
This commit is contained in:
parent
5387eae674
commit
a172214f16
@ -32,14 +32,20 @@ palette = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Compute matrix of CIE2000 delta values for this palette, representing
|
def compute_diff_matrix():
|
||||||
# perceptual distance between colours.
|
# Compute matrix of CIE2000 delta values for this palette, representing
|
||||||
diff_matrix = np.ndarray(shape=(16, 16), dtype=np.int)
|
# perceptual distance between colours.
|
||||||
for colour1, a in palette.items():
|
dm = np.ndarray(shape=(16, 16), dtype=np.int)
|
||||||
alab = colormath.color_conversions.convert_color(
|
|
||||||
a, colormath.color_objects.LabColor)
|
for colour1, a in palette.items():
|
||||||
for colour2, b in palette.items():
|
alab = colormath.color_conversions.convert_color(
|
||||||
blab = colormath.color_conversions.convert_color(
|
a, colormath.color_objects.LabColor)
|
||||||
b, colormath.color_objects.LabColor)
|
for colour2, b in palette.items():
|
||||||
diff_matrix[colour1.value, colour2.value] = int(
|
blab = colormath.color_conversions.convert_color(
|
||||||
colormath.color_diff.delta_e_cie2000(alab, blab))
|
b, colormath.color_objects.LabColor)
|
||||||
|
dm[colour1.value, colour2.value] = int(
|
||||||
|
colormath.color_diff.delta_e_cie2000(alab, blab))
|
||||||
|
return dm
|
||||||
|
|
||||||
|
|
||||||
|
diff_matrix = compute_diff_matrix()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user