Skip to content

Commit

Permalink
Implement support for "ACES" IDT matrix computation.
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed Apr 21, 2020
1 parent 8c222fc commit e52dc64
Show file tree
Hide file tree
Showing 9 changed files with 2,132 additions and 626 deletions.
1,217 changes: 617 additions & 600 deletions BIBLIOGRAPHY.bib

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions README.rst
Expand Up @@ -279,6 +279,18 @@ Colour Correction - ``colour characterisation``
>>> sorted(colour.COLOUR_CORRECTION_METHODS.keys())
['Cheung 2004', 'Finlayson 2015', 'Vandermonde']
ACES Input Transform - ``colour characterisation``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block:: python
>>> sensitivities = colour.CAMERA_RGB_SPECTRAL_SENSITIVITIES['Nikon 5100 (NPL)']
>>> illuminant = colour.ILLUMINANT_SDS['D55']
>>> colour.idt_matrix(sensitivities, illuminant)
array([[ 0.46579991, 0.13409239, 0.01935141],
[ 0.01786094, 0.77557292, -0.16775555],
[ 0.03458652, -0.16152926, 0.74270359]])
Colorimetry - ``colour.colorimetry``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
28 changes: 14 additions & 14 deletions colour/__init__.py
Expand Up @@ -124,12 +124,6 @@
normalised_primary_matrix, oetf, oetf_inverse, ootf, ootf_inverse,
primaries_whitepoint, sRGB_to_XYZ, uv_to_Luv, uv_to_UCS, xyY_to_XYZ,
xyY_to_xy, xy_to_Luv_uv, xy_to_UCS_uv, xy_to_XYZ, xy_to_xyY)
from .characterisation import (
CAMERA_RGB_SPECTRAL_SENSITIVITIES, COLOURCHECKERS, COLOURCHECKER_SDS,
DISPLAY_RGB_PRIMARIES, FILTER_SDS, LENS_SDS, POLYNOMIAL_EXPANSION_METHODS,
polynomial_expansion, COLOUR_CORRECTION_MATRIX_METHODS,
colour_correction_matrix, COLOUR_CORRECTION_METHODS, colour_correction,
sd_to_aces_relative_exposure_values)
from .corresponding import (
BRENEMAN_EXPERIMENTS, BRENEMAN_EXPERIMENT_PRIMARIES_CHROMATICITIES,
CORRESPONDING_CHROMATICITIES_PREDICTION_MODELS, CorrespondingColourDataset,
Expand All @@ -148,6 +142,12 @@
from .temperature import (CCT_TO_UV_METHODS, CCT_TO_XY_METHODS, CCT_to_uv,
CCT_to_xy, UV_TO_CCT_METHODS, XY_TO_CCT_METHODS,
uv_to_CCT, xy_to_CCT)
from .characterisation import (
CAMERA_RGB_SPECTRAL_SENSITIVITIES, COLOURCHECKERS, COLOURCHECKER_SDS,
DISPLAY_RGB_PRIMARIES, FILTER_SDS, LENS_SDS, POLYNOMIAL_EXPANSION_METHODS,
polynomial_expansion, COLOUR_CORRECTION_MATRIX_METHODS,
colour_correction_matrix, COLOUR_CORRECTION_METHODS, colour_correction,
idt_matrix, sd_to_aces_relative_exposure_values)
from .volume import (ILLUMINANT_OPTIMAL_COLOUR_STIMULI, RGB_colourspace_limits,
RGB_colourspace_pointer_gamut_coverage_MonteCarlo,
RGB_colourspace_visible_spectrum_coverage_MonteCarlo,
Expand Down Expand Up @@ -265,14 +265,6 @@
'uv_to_UCS', 'xyY_to_XYZ', 'xyY_to_xy', 'xy_to_Luv_uv', 'xy_to_UCS_uv',
'xy_to_XYZ', 'xy_to_xyY'
]
__all__ += [
'CAMERA_RGB_SPECTRAL_SENSITIVITIES', 'COLOURCHECKERS', 'COLOURCHECKER_SDS',
'DISPLAY_RGB_PRIMARIES', 'FILTER_SDS', 'LENS_SDS',
'POLYNOMIAL_EXPANSION_METHODS', 'polynomial_expansion',
'COLOUR_CORRECTION_MATRIX_METHODS', 'colour_correction_matrix',
'COLOUR_CORRECTION_METHODS', 'colour_correction',
'sd_to_aces_relative_exposure_values'
]
__all__ += [
'BRENEMAN_EXPERIMENTS', 'BRENEMAN_EXPERIMENT_PRIMARIES_CHROMATICITIES',
'CORRESPONDING_CHROMATICITIES_PREDICTION_MODELS',
Expand All @@ -296,6 +288,14 @@
'CCT_TO_UV_METHODS', 'CCT_TO_XY_METHODS', 'CCT_to_uv', 'CCT_to_xy',
'UV_TO_CCT_METHODS', 'XY_TO_CCT_METHODS', 'uv_to_CCT', 'xy_to_CCT'
]
__all__ += [
'CAMERA_RGB_SPECTRAL_SENSITIVITIES', 'COLOURCHECKERS', 'COLOURCHECKER_SDS',
'DISPLAY_RGB_PRIMARIES', 'FILTER_SDS', 'LENS_SDS',
'POLYNOMIAL_EXPANSION_METHODS', 'polynomial_expansion',
'COLOUR_CORRECTION_MATRIX_METHODS', 'colour_correction_matrix',
'COLOUR_CORRECTION_METHODS', 'colour_correction', 'idt_matrix',
'sd_to_aces_relative_exposure_values'
]
__all__ += [
'ILLUMINANT_OPTIMAL_COLOUR_STIMULI', 'RGB_colourspace_limits',
'RGB_colourspace_pointer_gamut_coverage_MonteCarlo',
Expand Down
18 changes: 14 additions & 4 deletions colour/characterisation/__init__.py
Expand Up @@ -6,7 +6,12 @@
from .displays import RGB_DisplayPrimaries
from .datasets import * # noqa
from . import datasets
from .aces_it import sd_to_aces_relative_exposure_values
from .aces_it import (
sd_to_aces_relative_exposure_values, read_training_data_rawtoaces_v1,
generate_illuminants_rawtoaces_v1, white_balance_multipliers,
best_illuminant, normalise_illuminant, training_data_sds_to_RGB,
training_data_sds_to_XYZ, optimization_factory_rawtoaces_v1,
optimization_factory_JzAzBz, idt_matrix)
from .correction import (
augmented_matrix_Cheung2004, polynomial_expansion_Finlayson2015,
polynomial_expansion_Vandermonde, POLYNOMIAL_EXPANSION_METHODS,
Expand All @@ -17,11 +22,16 @@
colour_correction_Finlayson2015, colour_correction_Vandermonde,
COLOUR_CORRECTION_METHODS, colour_correction)

__all__ = []
__all__ += ['RGB_SpectralSensitivities']
__all__ = ['RGB_SpectralSensitivities']
__all__ += ['RGB_DisplayPrimaries']
__all__ += datasets.__all__
__all__ += ['sd_to_aces_relative_exposure_values']
__all__ += [
'sd_to_aces_relative_exposure_values', 'read_training_data_rawtoaces_v1',
'generate_illuminants_rawtoaces_v1', 'white_balance_multipliers',
'best_illuminant', 'normalise_illuminant', 'training_data_sds_to_RGB',
'training_data_sds_to_XYZ', 'optimization_factory_rawtoaces_v1',
'optimization_factory_JzAzBz', 'idt_matrix'
]
__all__ += [
'augmented_matrix_Cheung2004', 'polynomial_expansion_Finlayson2015',
'polynomial_expansion_Vandermonde', 'POLYNOMIAL_EXPANSION_METHODS',
Expand Down

0 comments on commit e52dc64

Please sign in to comment.