Skip to main content
Source Link

As noted in this thread, the CIE sensitivity functions are built-in, yet undocumented:

ChromaticityPlot; (* force autoload *)
xyz = Interpolation[Transpose[{Image`ColorOperationsDump`$wavelengths, #}]] & /@ 
      Transpose[Image`ColorOperationsDump`tris];

However,

MinMax[Image`ColorOperationsDump`$wavelengths]
   {{385, 745}}

its coverage is a little off from the desired integral in the OP, so I'll just demonstrate the integral from $385$ to $700\,\mathrm{nm}$. (If wanted, you can download a finer tabulation with more coverage.)

From here, we can use the sRGB conversion functions from this answer, and then use NIntegrate[] with the setting Method -> "InterpolationPointsSubdivision":

(* gamma correction *)
sRGBGamma = Function[x, With[{z = Abs[x]},
                             Sign[x] Piecewise[{{12.92 z, z <= 0.0031308}},
                                               1.055 z^(1/2.4) - 0.055]],
                     Listable];

NIntegrate[Clip[#, {0, 1}]/λ^4, {λ, 385, 700},
           Method -> "InterpolationPointsSubdivision"] & /@ 
sRGBGamma[{{3.2404542, -1.5371385, -0.49853141},
           {-0.96926603, 1.8760108, 0.041556017},
           {0.055643431, -0.20402591, 1.0572252}}.Through[xyz[λ]]]
   {1.48544*10^-9, 1.36666*10^-9, 2.28451*10^-9}
Post Made Community Wiki by J. M.'s missing motivation