You can't do this unless you have a color calibrated system. You will need to get a ColorChecker Passport http://xritephoto.com/ph_product_overview.aspx?ID=1257&action=overview and have this in the field of view. Then you will have to do a least squares regression to create a transform to convert your RGB values into XYZ values. Use this transform to get X, Y, and Z images. Then use the analytical formulas to go from XYZ to LAB values. So then you have an LAB image and it's just a simple matter of clustering. cform = makecform('srgb2lab');
lab_he = applycform(he,cform);
Again, that's for just a quick-and-dirty, proof-of-concept approach. It's not good if you want accurate results. Why? Well the formulas go from sRGB to XYZ. Well your camera gives sRGB doesn't it? That's what they tell you. However you know that you can get any RGB you want by changing exposure time on the camera, or color temperature of your illumination. Did your subject change? No - it's the same tongue. Changing image capture conditions didn't change the tongue. But your RGB changed. So that means that different exposures will give you different LAB values (if you use book formulas) even though the LAB value of the subject tongue didn't change at all.
Either way, then just look at the LAB values of all the pixels in your image and determine what class (C, R, B, P, DR, etc.) they are closest to and assign that pixel to that class number (give each class a number like C=1, R=2, etc.). Now you have a classified image and you can just get area fractions directly
for cl = 1 : numberOfClasses
binaryImage = (classifiedImage(:) == cl);
imshow(binaryImage);
caption = sprintf('Class %d', cl);
title(caption, 'FontSize', 16);
areaFraction(cl) = sum(binaryImage(:));
end
Of course, like I said, all your numbers are totally arbitrary. Well not totally arbitrary (like a totally random numbers) -- the rankings of the different classes may be fairly correct, but each individual area fraction is not really accurate.