MATLAB: How to calculate the color difference among series of similar portraits

color analysiscolor comparisoncolor differencedelta eImage Processing Toolboxmean and deviation

Hi everyone,
I have photographed dozens of people in groups of 8 portraits, all with equal illumination, gray background and color calibrated. I need to obtain the color difference inside each group and I'm particularly interested in the skin color.
1 — How to calculate the color difference (comparing photo nr 1 to each one of the other 7)?
2 — Is it possible to obtain the regions of the image in which color changes the most, and by how much?
(see image in attach as example: the 1st one is the control image to which the 2nd and others will be compared)
Thanks in advance for any help provided to this research student with a deadline to accomplish!! Best regards, Teresa.

Best Answer

  • You need to calculate the delta E. See my File Exchange: for an example. Though that demo asks you to lasso an area and calculates the delta E between each pixel in the image and a single constant value that is the mean of the lassooed area. What you need to do is lasso the face area on each portrait and then see what the mean LAB color is for each. Then calculate the delta E from those two sets of LAB value. If there is no difference, then the delta E will be zero. The more color difference, the higher the delta E. You need to convert each image to lab with makecform() and applycform() then get the mean L, mean A, and mean B of the lassooed area (the face).