https://github.com/crowsonkb/ucs
Implements the CAM02-UCS (Luo et al. (2006)) forward transform.
https://github.com/crowsonkb/ucs
color-science theano
Last synced: 6 months ago
JSON representation
Implements the CAM02-UCS (Luo et al. (2006)) forward transform.
- Host: GitHub
- URL: https://github.com/crowsonkb/ucs
- Owner: crowsonkb
- License: mit
- Created: 2017-03-22T23:13:28.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-16T07:48:53.000Z (over 8 years ago)
- Last Synced: 2025-04-12T22:44:22.139Z (6 months ago)
- Topics: color-science, theano
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
ucs
===Implements the CAM02-UCS (Luo et al. (2006), "`Uniform Colour Spaces Based on CIECAM02 Colour Appearance Model `_") forward transform symbolically, using Theano.
See also: `CIECAM02 and Its Recent Developments `_.
The forward transform is symbolically differentiable in Theano and it may be approximately inverted, subject to gamut boundaries, by constrained function minimization (e.g. projected gradient descent or `L-BFGS-B `_).
Package contents
----------------- ``constants.py`` contains constants needed by CAM02-UCS and others which are merely useful.
- ``functions.py`` contains compiled Theano functions, as well as NumPy equivalents of other symbolic functions. It also contains ``ucs_to_srgb()`` and ``ucs_to_srgb_b()``, which approximately invert the CAM02-UCS forward transform with L-BFGS-B.
- ``symbolic.py`` implements the forward transform symbolically in Theano. The functions therein can be used to construct custom auto-differentiable loss functions to be subject to optimization.