Following up on this original question & response
We are using a pre and post treatment design to measure the impact of dietary supplements on color. Originally, my plan was to use a PCA to simplify normalized %RGB and Brightness into a single variable (PC1) (see Nokelainan et al. 2019, DOI: 10.1111/1365-2435.13280). However, I am also curious about using CIE l*a*b because that is what studies with similar goals have chosen to use.
I have collected normalized %RGB values from ROIs of different body regions in multispectral images created in micaToolbox (using a single grey standard and black point estimates, same camera & lighting set up indoors). Is there a package in R, or suite of equations, I can use to determine l*a*b from the %RGB scores I gathered in micaToolbox? If I understand correctly, I think I could have done that while in imageJ, but I am hoping there is an option that doesn’t involve reanalyzing the images.
It’s pretty straightforward converting from sRGB to CIELAB (you could look in the code for the scripts in the toolbox, or google it). However, the linear, normalised RGB output from the camera is not exactly the same as sRGB. The toolbox linear normalised RGB reflectance is based on the unmolested camera sensitivities.
sRGB is a colour space that is based on the CIE XYZ sensitivity curves, making it straightforward to convert between spaces (including CIE LAB).
So the process you’ll need is:
- Apply cone-catch model to convert from camera RGB to CIE XYZ
- Convert CIE XYZ to CIE LAB
If you want, you can in principle apply this to your data without re-measuring. Just make the CIE XYZ model above using the standard toolbox methods, then look in the .JAVA code that this generates in “ImageJ/plugins/cone models”. You’ll see the lines of code that convert from RGB to each of the LAB channels. These are long polynomial equations. Just replicate these equations in you R code, or spreadsheet cells etc… replacing the terms.