####### BT.709.RGB is created using the following recipe ########
P = matrix( c(0.64,0.33,NA, 0.3,0.6,NA, 0.15,0.06,NA ), 3, 3, byrow=TRUE )
rownames(P) = c('R','G','B')
BT.709.RGB = ptransform( xyz1931.1nm, P, D65.1nm )
quantity(BT.709.RGB) = "energy->electrical"
####### Adobe.RGB recipe is the same, except for the matrix P ########
P = matrix( c(0.64,0.33,NA, 0.21,0.71,NA, 0.15,0.06,NA ), 3, 3, byrow=TRUE )
rownames(P) = c('R','G','B')
Adobe.RGB = ptransform( xyz1931.1nm, P, D65.1nm )
quantity(Adobe.RGB) = "energy->electrical"
####### white-balancing ACES.RGB for CIE Standard Illuminant D60 ########
# in a scene illuminated by daylight illuminant D6003,
# and with a perfect-reflecting-diffuser in that scene,
# object 'camera1' would have response RGB=(1,1,1) for that diffuser.
D6003 = daylightSpectra( 6000*1.4388/1.4380, wavelength=wavelength(ACES.RGB) )
camera1 = calibrate( ACES.RGB, D6003, 1, method='scaling' )
Run the code above in your browser using DataLab