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