Skip to content

Instantly share code, notes, and snippets.

View KelSolaar's full-sized avatar
🔅
Bending Light

Thomas Mansencal KelSolaar

🔅
Bending Light
View GitHub Profile
@KelSolaar
KelSolaar / about_linear_workflow.ipynb
Created October 16, 2014 11:31
About Linear Workflow
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KelSolaar
KelSolaar / about_python_cython_numpy.ipynb
Last active August 29, 2015 14:07
About Python, Cython & Numpy
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KelSolaar
KelSolaar / Sony_F35_IDT_ramblings.nkp
Created February 11, 2015 08:58
Sony F35 IDT Ramblings
set cut_paste_input [stack 0]
version 8.0 v1
Read {
inputs 0
file /Users/kelsolaar/Downloads/Pictures/SonyF35.StillLife.dpx
format "1920 1080 0 0 1920 1080 1 HD"
origset true
version 2
colorspace linear
raw true
@KelSolaar
KelSolaar / M_i\cdot M = M_o.py
Created February 18, 2015 15:21
M_i . M = M_o
import numpy as np
np.random.seed(64)
M_i = np.random.random((3, 3))
M_o = np.random.random((3, 3))
# M . M_i = M_o
# M . M_i . M_i^{-1} = M_o . M_i^{-1}
@KelSolaar
KelSolaar / hue_change.py
Created March 8, 2015 00:32
Hue - Change
from pprint import pprint
from colour import XYZ_to_CIECAM02, CIECAM02_VIEWING_CONDITIONS, sRGB_to_XYZ
from colour.models.deprecated import RGB_to_HSV
XYZ = np.array([19.01, 20.00, 21.78])
XYZ_w = np.array([95.05, 100.00, 108.88])
L_A = 318.31
Y_b = 20.0
surround = CIECAM02_VIEWING_CONDITIONS['Average']
@KelSolaar
KelSolaar / rgb_colourspace_whitepoint_change.ipynb
Last active August 29, 2015 14:17
RGB Colourspace Whitepoint Change
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KelSolaar
KelSolaar / rgb_colourspace_transformation_with_lut.nkp
Created April 2, 2015 21:35
RGB Colourspace Transformation with LUT
set cut_paste_input [stack 0]
version 8.0 v1
CMSTestPattern {
inputs 0
name CMSTestPattern
selected true
xpos 180
ypos -57
}
clone node11d373b60|Colorspace|60327 Colorspace {
@KelSolaar
KelSolaar / mmColorTarget.py
Created May 2, 2015 20:37
mmColorTarget - Colourspaces
import numpy as np
import colour
name, data, illuminant = colour.COLOURCHECKERS['ColorChecker 2005']
for i, (name, colourspace) in enumerate(
sorted(colour.RGB_COLOURSPACES.items())):
if name in ('aces', 'adobe1998', 'prophoto'):
continue
@KelSolaar
KelSolaar / plane_visual_box_visual_vispy.py
Last active August 29, 2015 14:21
PlaneVisual & BoxVisual - Vispy
# !/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division
import sys
import numpy as np
from vispy import scene
from vispy.scene.visuals import create_visual_node
from vispy.visuals.mesh import MeshVisual
@KelSolaar
KelSolaar / rgb_luminance.py
Created June 13, 2015 11:20
RGB Luminance
# https://github.com/colour-science/colour/blob/develop/colour/models/derivation.py#L158
import colour
sRGB = colour.RGB_COLOURSPACES['sRGB']
colour.RGB_luminance_equation(sRGB.primaries, sRGB.whitepoint)
# u'Y = 0.212636821677(R) + 0.715182981841(G) + 0.0721801964814(B)'