Converting RGB to CIELAB and averaging

Tags: #<Tag:0x00007fd69ca81540>



I am completely new to image analysis but I am assisting on a project where this is of major importance.
Basically, I need to obtain Lab* values from images I will be taking from a digital camera on standardized settings. As I understand, I will be obtaining the images in RGB color model.

I found in other topics that by selecting Image->Color->RGB to CIELAB and Image->Stacks->Stack to Images, I am obtaining the image in each of this three coordinates and, as I understand, the conversion so far is done, as I see these three new windows with the image in gray scale, each of them named L, a and b. I am specifically interested in working with L* and a*.

So my question would be, is the measuring, or obtaining the average L* and a* values, as simple as selecting the area I wish to measure, and selecting (for example) Analyze->Measure? Or what are the steps that I actually need to take?

I hope the information I am giving is enough and otherwise I am happy to be more specific. I really hope someone is willing to assist as I am completely lost.




Perhaps I am not the best person to answer you… I’ve not worked so much with CIELAB images myself. But I did find an older post on the ImageJ listserv you can check out - might be helpful to you - has some important cautionary info.

Until someone can provide you more specific help in this …



Thank you @etarena

I found that post too but it does not go into specifics of how to actually convert from RGB to CIELAB, and how to perform the actual averaging.

Perhaps someone could assist in this particular matter?



Dear @jmtorres,

While this post is a bit old I figure it would be nice to answer your initial question

In short, yes. when you convert an RGB image to LAB, you will notice that it has now 3 slices
(Notice the slider at the bottom of the image)

Now if you look under the title, you will notice that on my screenshot, it says “1/3 (L)” by moving the slicer you will access the a and b values.

So you can select the area as you said, and now hit "Measure"
The measurement on the results table will be the average of the area on the currently selected slice. Just move to the next slice (The selection will remain) and hit measure again, you will get the value for that slice.

If you make sure that you check “Display Label” from the Analyze > Set Measurements, you will notice that the Label column in the Results window will contain the slice you did the measurement on.



Dear @oburri

Thank you very much for your reply.

Then these obtained measurments (displayed in the mean column) should be the actual L* a* and b* colour values am I right?

By any chance, do you know if it is necessary to Threshold the image or if any “calibration” steps are needed to properly determine these colour values, and if so, how is this properly done?

Again, thanks for your help



Indeed. They will either be the mean of the entire image or of the selection you have made on it.

No thresholding per se if you know where you want to measure.

Regarding calibration, it is usually the case with photography that you acquire the image with a color reference card, something like or These usually come with their own software to perform the calibration.