Skip to content

Commit 0868032

Browse files
committed
Updated README
1 parent dc9ae96 commit 0868032

File tree

1 file changed

+44
-21
lines changed

1 file changed

+44
-21
lines changed

README.rst

Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,42 @@
11
pycam02ucs
22
==========
33

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-
194
.. image:: https://travis-ci.org/njsmith/pycam02ucs.png?branch=master
205
:target: https://travis-ci.org/njsmith/pycam02ucs
216
.. image:: https://coveralls.io/repos/njsmith/pycam02ucs/badge.png?branch=master
227
:target: https://coveralls.io/r/njsmith/pycam02ucs?branch=master
238

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+
2435
Documentation:
2536
TODO
2637

2738
Installation:
28-
``python setup.py install``
39+
``pip install .``
2940

3041
Downloads:
3142
TODO
@@ -46,9 +57,21 @@ Developer dependencies (only needed for hacking on source):
4657
License:
4758
MIT, see LICENSE.txt for details.
4859

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+
4971
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

Comments
 (0)