For the purpose of visualizing certain data, I’m supposed to utilize the colorings. Namely, the C++ code I have on disposal is outputting using cairo-graphics, and the function is based on RGB space. The data I work with should, on the other hand, utilize “certain slice” of the CIELab color space.
The question is: what would be the most appropriate way to do this with C++? Perhaps some conversion that might still rely on the RGB function provided by cairo (though I doubt this alternative, since RGB is device-dependent)?
OpenCV has some built-in color conversions. You could use them, or use them as an inspiration for your own color conversion routine.
See the doc about color conversion in OpenCV (cv::cvtColor)
One possible way to use it could be :
Beware: I did not test or compile this code, this is just a draft.