
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import colour | |
colour.filter_warnings() | |
XYZ = colour.spectral_to_XYZ(colour.ILLUMINANTS_RELATIVE_SPDS['D65']) / 100.0 | |
UCS = colour.XYZ_to_UCS(XYZ) | |
uv = colour.UCS_to_uv(UCS) | |
CCT, D_uv = colour.uv_to_CCT_Ohno2013(uv) | |
print(CCT, D_uv) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set cut_paste_input [stack 0] | |
version 9.0 v4 | |
push $cut_paste_input | |
Group { | |
name Absolute_Luminance_Calibration | |
tile_color 0xffbf00ff | |
selected true | |
xpos -40 | |
ypos 39 | |
addUserKnob {20 absolute_luminance_calibration_tab l "Absolute Luminance Calibration"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
///////////////////// | |
// slack2html | |
// by @levelsio | |
///////////////////// | |
// | |
///////////////////// | |
// WHAT DOES THIS DO? | |
///////////////////// | |
// |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import colour | |
# Manual NPM Derivation | |
primaries=np.array([[0.1, 0.2], | |
[0.3, 0.4], | |
[0.5, 0.6]]) | |
whitepoint=np.array([0.5, 0.5]) | |
npm = colour.normalised_primary_matrix( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using latest colour develop branch. | |
import colour | |
D65 = colour.ILLUMINANTS['cie_2_1931']['D65'] | |
P = colour.ROMM_RGB_COLOURSPACE.primaries | |
W = colour.ROMM_RGB_COLOURSPACE.whitepoint | |
P_a = colour.chromatically_adapted_primaries(P, W, D65) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import colour | |
RGB_i = [0.325683457522574, 0.094356847568351, 0.745367969845698] | |
RGB_o = np.ones(3) | |
for i in range(10000): | |
RGB_o = colour.HSV_to_RGB(colour.RGB_to_HSV(RGB_i)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import colour | |
# Normalisation factor k = 1 in colour.spectral_to_XYZ_integration: | |
# https://github.com/colour-science/colour/blob/535609305db468d1f7e96e2500c110dc6550803c/colour/colorimetry/tristimulus.py#L471 | |
colour.spectral_to_XYZ_integration(colour.ILLUMINANTS_RELATIVE_SPDS['E']) / 100 | |
# array([ 106.86546949, 106.8569171 , 106.89225128]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from astropy.io import fits | |
import colour | |
import colour_demosaicing | |
image = its.getdata('test.fits', ext=0).astype(np.float_) / 255.0 | |
# image = colour.orient(image, '90 CW') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IDT.Canon.EOSC700_CanonLog_CinemaGamut_TypeC_D55.a1.v1.ctl | |
import numpy as np | |
import colour | |
EOSC700_CINEMAGAMUT_TO_ACES_2065_1 = np.array( | |
[[0.763064455, 0.149021161, 0.087914384], | |
[0.003657457, 1.10696038, -0.110617837], | |
[-0.009407794, - 0.218383305, 1.227791099]]) |