:

## Pixel Conversion

Maple 18

Here is an example of manipulating an Array of pixels. I chose the x-rite ColorChecker as a model so there would be published results to check my work. A number of details about color spaces have become clear through this exercise. The color adaptation process was modeled by converting betweenXYZ and LMS. Different black points may be selected depending on how close to zero illuminance one would accept as a good model.

I look forward to extending this work to verify and improve the color calibration of my photography. Also some experimentation with demosaicing should be possible.

 Initialization

x-rite Colorchecker xyY Matrix

=

=

 Convert xyY to XYZ

=

 XYZ D50 to XYZ D65

=

Convert XYZ to Lab (D50 or D65 White Point)

 Reference White Point for D50  =  =  = Lab Conversion Constants; Reference White Point for D65  =  =  =

=

Convert XYZ to aRGB (XYZ D50 or D65 to aRGB D65)

XYZ Scaling for aRGB Ymax,Ymin (Ref. Adobe RGB (1998) Color Image Encoding Section 4.3.2.2 and 4.3.8)

 White Point (Luminance=160Cd/m^2) D65 Black Point (Luminance=0.5557Cd/m^2) D65 White Point (Luminance=160Cd/m^2) D50 Black Point (Luminance=0.5557Cd/m^2) D50 =  =  = =  =  =

aRGB Expansion for 8bits

Combine Steps

Note: The aRGB values published for ColorChecker assume a black point of 0cd/m^2.

=

=

 Convert XYZ to ProPhoto RGB (D50)

=

 Convert XYZ to sRGB (XYZ D50 or D65 to sRGB D65)

Note: The sRGB values published for ColorChecker assume a black point of 0cd/m^2.

=

=

Corrections to the original version of theis document;
 Make the scaling for a nonzero black point the same for all RGB color spaces.
 Clip negative RGB values to zero.
 Remove the redundant Array container from matrix multiplications.
Use map in place of the \$ to apply a function to each element of an Array.

﻿