summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2020-07-24 18:28:14 +0200
committerPaweł Redman <pawel.redman@gmail.com>2020-07-24 18:28:14 +0200
commit77f03e8814315486bd2db5de484e2ad1c8b3bc96 (patch)
tree3fa104594014c0e7dd23478a54b235fdf33f3584
parent162aeb511f5bafc67b16fb920f9f8d037d4ab7ca (diff)
Use the constant illuminant by default.
-rw-r--r--demo.py2
-rw-r--r--otsu2018.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/demo.py b/demo.py
index dbaa77d..eb02202 100644
--- a/demo.py
+++ b/demo.py
@@ -39,7 +39,7 @@ if __name__ == '__main__':
plt.plot(sd.wavelengths, sd.values, label='Original')
- XYZ = sd_to_XYZ(sd, illuminant=ILLUMINANT_SDS['D65']) / 100
+ XYZ = sd_to_XYZ(sd) / 100
recovered_sd = clustering.reconstruct(XYZ)
plt.plot(recovered_sd.wavelengths, recovered_sd.values,
label='Recovered')
diff --git a/otsu2018.py b/otsu2018.py
index 88ab261..b99e563 100644
--- a/otsu2018.py
+++ b/otsu2018.py
@@ -4,7 +4,7 @@ import tqdm
import time
from colour import (SpectralDistribution, STANDARD_OBSERVER_CMFS,
- ILLUMINANT_SDS, sd_to_XYZ, XYZ_to_xy)
+ sd_ones, sd_to_XYZ, XYZ_to_xy)
from colour.plotting import plot_chromaticity_diagram_CIE1931
@@ -450,7 +450,7 @@ class Clustering:
sds,
shape,
cmfs=STANDARD_OBSERVER_CMFS['CIE 1931 2 Degree Standard Observer'],
- illuminant=ILLUMINANT_SDS['D65']):
+ illuminant=sd_ones()):
"""
Parameters
----------