1
1
pycam02ucs
2
2
==========
3
3
4
- Compute perceptual similarity between sRGB colors according to the
5
- CAM02-UCS formula given by:
6
-
7
- Luo, M. R., Cui, G., & Li, C. (2006). Uniform colour spaces based on
8
- CIECAM02 colour appearance model. Color Research & Application, 31(4),
9
- 320–330. doi:10.1002/col.20227
10
-
11
- We can also calculate the "large color difference" (LCD) and "short
12
- color difference" (SCD) metrics estimated by the same publication. The
13
- UCS ("uniform color space") metric is defined as a compromise between
14
- these two.
15
-
16
- We also have a complete CIECAM02 implementation. Maybe that should get
17
- higher billing.
18
-
19
4
.. image :: https://travis-ci.org/njsmith/pycam02ucs.png?branch=master
20
5
:target: https://travis-ci.org/njsmith/pycam02ucs
21
6
.. image :: https://coveralls.io/repos/njsmith/pycam02ucs/badge.png?branch=master
22
7
:target: https://coveralls.io/r/njsmith/pycam02ucs?branch=master
23
8
9
+ This is an powerful, accurate, and easy-to-use library for performing
10
+ colorspace conversions.
11
+
12
+ In addition to the most common standard colorspaces (sRGB, XYZ, xyY,
13
+ CIELab, CIELCh), we also include: color vision deficiency ("color
14
+ blindness") simulations using the approach of Machado et al (2009); a
15
+ complete implementation of `CIECAM02
16
+ <https://en.wikipedia.org/wiki/CIECAM02> `_; and the perceptually
17
+ uniform CAM02-UCS / CAM02-LCD / CAM02-SCD spaces proposed by Luo et al
18
+ (2006).
19
+
20
+ To use it, simply write::
21
+
22
+ from pycam02ucs import cspace_convert
23
+
24
+ Jp, ap, bp = cspace_convert([64, 128, 255], "sRGB255", "CAM02-UCS")
25
+
26
+ Converts an sRGB value (represented as integers between 0-255) to
27
+ CAM02-UCS J'a'b' coordinates (assuming standard sRGB viewing
28
+ conditions). This requires passing through 4 intermediate colorspaces;
29
+ cspace_convert automatically finds the optimal route and applies all
30
+ conversions in sequence:
31
+
32
+ This function also of course accepts arbitrary NumPy arrays, so
33
+ converting a whole image is just as easy as converting a single value.
34
+
24
35
Documentation:
25
36
TODO
26
37
27
38
Installation:
28
- ``python setup.py install ``
39
+ ``pip install . ``
29
40
30
41
Downloads:
31
42
TODO
@@ -46,9 +57,21 @@ Developer dependencies (only needed for hacking on source):
46
57
License:
47
58
MIT, see LICENSE.txt for details.
48
59
60
+ References:
61
+
62
+ Luo, M. R., Cui, G., & Li, C. (2006). Uniform colour spaces based on
63
+ CIECAM02 colour appearance model. Color Research & Application, 31(4),
64
+ 320–330. doi:10.1002/col.20227
65
+
66
+ Machado, G. M., Oliveira, M. M., & Fernandes, L. A. (2009). A
67
+ physiologically-based model for simulation of color vision
68
+ deficiency. Visualization and Computer Graphics, IEEE Transactions on,
69
+ 15(6), 1291–1298. http://www.inf.ufrgs.br/~oliveira/pubs_files/CVD_Simulation/CVD_Simulation.html
70
+
49
71
Other Python packages with similar functionality that you might also
50
- like to consider:
51
- * ``colour ``: http://colour-science.org/
52
- * ``colormath ``: http://python-colormath.readthedocs.org/
53
- * ``ciecam02 ``: https://pypi.python.org/pypi/ciecam02/
54
- * ``ColorPy ``: http://markkness.net/colorpy/ColorPy.html
72
+ want to check out:
73
+
74
+ * ``colour ``: http://colour-science.org/
75
+ * ``colormath ``: http://python-colormath.readthedocs.org/
76
+ * ``ciecam02 ``: https://pypi.python.org/pypi/ciecam02/
77
+ * ``ColorPy ``: http://markkness.net/colorpy/ColorPy.html
0 commit comments