Skip to content

Commit

Permalink
Merge 370b34e into ab7b1b3
Browse files Browse the repository at this point in the history
  • Loading branch information
KelSolaar committed May 21, 2018
2 parents ab7b1b3 + 370b34e commit 5d269fc
Show file tree
Hide file tree
Showing 69 changed files with 7,229 additions and 835 deletions.
1,043 changes: 559 additions & 484 deletions BIBLIOGRAPHY.bib

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions README.rst
Expand Up @@ -669,6 +669,20 @@ Colour Difference
'cie1994',
'cie2000']
Colour Correction
^^^^^^^^^^^^^^^^^

.. code-block:: python
>>> import numpy as np
>>> RGB = [0.17224810, 0.09170660, 0.06416938]
>>> M_T = np.random.random((24, 3))
>>> M_R = M_T + (np.random.random((24, 3)) - 0.5) * 0.5
>>> colour.colour_correction(RGB, M_T, M_R)
array([ 0.15205429, 0.08974029, 0.04141435])
>>> sorted(colour.COLOUR_CORRECTION_METHODS.keys())
[u'Cheung 2004', u'Finlayson 2015', u'Vandermonde']
Colour Notation Systems
^^^^^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -800,6 +814,27 @@ Volume
>>> colour.RGB_colourspace_volume_MonteCarlo(colour.sRGB_COLOURSPACE)
857011.5
IO
^^

Look Up Table (LUT) Data
************************

.. code-block:: python
>>> LUT = colour.read_LUT('ACES_Proxy_10_to_ACES.cube')
>>> print(LUT)
LUT2D - ACES Proxy 10 to ACES
-----------------------------
Dimensions : 2
Domain : [[0 0 0]
[1 1 1]]
Size : (32, 3)
>>> RGB = [0.17224810, 0.09170660, 0.06416938]
>>> LUT.apply(RGB)
array([ 0.00575674, 0.00181493, 0.00121419])
Plotting
^^^^^^^^

Expand Down
47 changes: 30 additions & 17 deletions colour/__init__.py
Expand Up @@ -45,11 +45,12 @@
from .adaptation import (CHROMATIC_ADAPTATION_METHODS,
CHROMATIC_ADAPTATION_TRANSFORMS,
CMCCAT2000_VIEWING_CONDITIONS, chromatic_adaptation)
from .algebra import (
CubicSplineInterpolator, Extrapolator, KernelInterpolator,
LinearInterpolator, NullInterpolator, PchipInterpolator,
SpragueInterpolator, kernel_cardinal_spline, kernel_lanczos, kernel_linear,
kernel_nearest_neighbour, kernel_sinc, lagrange_coefficients)
from .algebra import (CubicSplineInterpolator, Extrapolator,
KernelInterpolator, LinearInterpolator, NullInterpolator,
PchipInterpolator, SpragueInterpolator,
TABLE_INTERPOLATION_METHODS, kernel_cardinal_spline,
kernel_lanczos, kernel_linear, kernel_nearest_neighbour,
kernel_sinc, table_interpolation, lagrange_coefficients)
from .colorimetry import (
ASTME30815_PRACTISE_SHAPE, BANDPASS_CORRECTION_METHODS,
CIE_standard_illuminant_A_function, CMFS, DEFAULT_SPECTRAL_SHAPE,
Expand Down Expand Up @@ -77,12 +78,15 @@
XYZ_to_CAM16, XYZ_to_CIECAM02, XYZ_to_Hunt, XYZ_to_LLAB, XYZ_to_Nayatani95,
XYZ_to_RLAB)
from .difference import DELTA_E_METHODS, delta_E
from .characterisation import (CAMERAS_RGB_SPECTRAL_SENSITIVITIES,
COLOURCHECKERS, COLOURCHECKERS_SPDS,
DISPLAYS_RGB_PRIMARIES, first_order_colour_fit)
from .io import (IES_TM2714_Spd, read_image, read_spds_from_csv_file,
read_spds_from_xrite_file, read_spectral_data_from_csv_file,
write_image, write_spds_to_csv_file)
from .characterisation import (
CAMERAS_RGB_SPECTRAL_SENSITIVITIES, COLOURCHECKERS, COLOURCHECKERS_SPDS,
DISPLAYS_RGB_PRIMARIES, POLYNOMIAL_EXPANSION_METHODS, polynomial_expansion,
COLOUR_CORRECTION_MATRIX_METHODS, colour_correction_matrix,
COLOUR_CORRECTION_METHODS, colour_correction)
from .io import (IES_TM2714_Spd, LUT1D, LUT2D, LUT3D, read_image, read_LUT,
read_spds_from_csv_file, read_spds_from_xrite_file,
read_spectral_data_from_csv_file, write_image, write_LUT,
write_spds_to_csv_file)
from .models import (
CAM02LCD_to_JMh_CIECAM02, CAM02SCD_to_JMh_CIECAM02,
CAM02UCS_to_JMh_CIECAM02, CAM16LCD_to_JMh_CAM16, CAM16SCD_to_JMh_CAM16,
Expand Down Expand Up @@ -149,8 +153,9 @@
__all__ += [
'CubicSplineInterpolator', 'Extrapolator', 'KernelInterpolator',
'LinearInterpolator', 'NullInterpolator', 'PchipInterpolator',
'SpragueInterpolator', 'kernel_cardinal_spline', 'kernel_lanczos',
'kernel_linear', 'kernel_nearest_neighbour', 'kernel_sinc',
'SpragueInterpolator', 'TABLE_INTERPOLATION_METHODS',
'kernel_cardinal_spline', 'kernel_lanczos', 'kernel_linear',
'kernel_nearest_neighbour', 'kernel_sinc', 'table_interpolation',
'lagrange_coefficients'
]
__all__ += [
Expand Down Expand Up @@ -187,12 +192,16 @@
__all__ += ['DELTA_E_METHODS', 'delta_E']
__all__ += [
'CAMERAS_RGB_SPECTRAL_SENSITIVITIES', 'COLOURCHECKERS',
'COLOURCHECKERS_SPDS', 'DISPLAYS_RGB_PRIMARIES', 'first_order_colour_fit'
'COLOURCHECKERS_SPDS', 'DISPLAYS_RGB_PRIMARIES',
'POLYNOMIAL_EXPANSION_METHODS', 'polynomial_expansion',
'COLOUR_CORRECTION_MATRIX_METHODS', 'colour_correction_matrix',
'COLOUR_CORRECTION_METHODS', 'colour_correction'
]
__all__ += [
'IES_TM2714_Spd', 'read_image', 'read_spds_from_csv_file',
'read_spds_from_xrite_file', 'read_spectral_data_from_csv_file',
'write_image', 'write_spds_to_csv_file'
'IES_TM2714_Spd', 'LUT1D', 'LUT2D', 'LUT3D', 'read_image', 'read_LUT',
'read_spds_from_csv_file', 'read_spds_from_xrite_file',
'read_spectral_data_from_csv_file', 'write_image', 'write_LUT',
'write_spds_to_csv_file'
]
__all__ += [
'CAM02LCD_to_JMh_CIECAM02', 'CAM02SCD_to_JMh_CIECAM02',
Expand Down Expand Up @@ -1583,6 +1592,10 @@ def __getattr__(self, attribute):
'colour.LIGHT_SOURCES_RELATIVE_SPDS',
'colour.LIGHT_SOURCES_SPDS',
],
[
'colour.first_order_colour_fit',
'colour.colour_correction_matrix',
],
]


Expand Down
10 changes: 8 additions & 2 deletions colour/algebra/__init__.py
Expand Up @@ -12,9 +12,12 @@
kernel_nearest_neighbour, kernel_linear, kernel_sinc, kernel_lanczos,
kernel_cardinal_spline, KernelInterpolator, LinearInterpolator,
SpragueInterpolator, CubicSplineInterpolator, PchipInterpolator,
NullInterpolator, lagrange_coefficients)
NullInterpolator, lagrange_coefficients, table_interpolation_trilinear,
table_interpolation_tetrahedral, TABLE_INTERPOLATION_METHODS,
table_interpolation)
from .matrix import is_identity
from .random import random_triplet_generator
from .regression import least_square_mapping_MoorePenrose

__all__ = []
__all__ += coordinates.__all__
Expand All @@ -27,7 +30,10 @@
'kernel_nearest_neighbour', 'kernel_linear', 'kernel_sinc',
'kernel_lanczos', 'kernel_cardinal_spline', 'KernelInterpolator',
'LinearInterpolator', 'SpragueInterpolator', 'CubicSplineInterpolator',
'PchipInterpolator', 'NullInterpolator', 'lagrange_coefficients'
'PchipInterpolator', 'NullInterpolator', 'lagrange_coefficients',
'table_interpolation_trilinear', 'table_interpolation_tetrahedral',
'TABLE_INTERPOLATION_METHODS', 'table_interpolation'
]
__all__ += ['is_identity']
__all__ += ['random_triplet_generator']
__all__ += ['least_square_mapping_MoorePenrose']

0 comments on commit 5d269fc

Please sign in to comment.