Search code examples
c++srgb

How to convert sRGB to CIELAb and CIELab to sRGB efficiently?


I don't understand how to convert sRGB to CIELab and backward. Help me please. it's desirable in с++ code


Solution

  • Convert from sRGB to RGB by applying inverse gamma, convert RGB to XYZ using 3x3 matrix, convert XYZ to Lab using standard formula and D6500 white point

    References:

    The rest... you can do on your own :-)