Clear Filters
Clear Filters

color calibration, mean square error

4 views (last 30 days)
i performed a radiometric calibration of the camera.how can i compare the color differences to the ground truth valuse before and after the calibration of the camera by means of a mean square error?how can i do the mean square evaluation and how to interpret the graysccale fitting?

Accepted Answer

Image Analyst
Image Analyst on 16 Feb 2019
Try this
deltaEImage = sqrt((lImage-refLImage).^2 + (aImage-refAImage).^2 + (bImage - refBImage).^2);
meanColorDifference = mean2(deltaEImage)
where the l, a, and b images are the calibrated LAB color space images.
I have no idea what you mean by grayscale fitting. It's a color image so to get calibrated values you must use calibrated standards and go to LAB color space. For computing color differences, you shouldn't be doing anything in RGB or grayscale color spaces. Those aren't calibration. Standardization maybe but not calibration.
  7 Comments
aguadopd
aguadopd on 14 Jun 2019
Edited: aguadopd on 14 Jun 2019
What a shame, I completely forgot about all the other values in the LUT! I will then try and see what happens and how long it takes. I will always have a checker in my images so I guess that forcing all the observed color to be exactly as the reference won't be a mistake, as long as we have more or less decent images.
Again, thank you a lot for your contributions!
EDIT:
I could use
  1. A 3D LUT with 256*256*256 elements
  2. 3x 2D LUTs with 256 elements each; a total of 256 x 3
The second case treats each channel as independent, which may not be a safe assumption.
Image Analyst
Image Analyst on 14 Jun 2019
I don't understand using 2-D luts. What are the different axes for?
Basically you'd need one 256x256x256 for each output, R, G, and B. So the input R, G, B would be the 3 indexes, and the value of the LUT would be the new R value. Then another LUT for the new green values, and another one for the new blue values, so you'd need three 16.7 million element 3-D LUTs to do a full conversion of an input RGB to a new/estimated output RGB.
For example if your input R was 111, input G was 222, and input B was 123, to get the new R you'd do
newR = redLUT(111,222,123);
Then to get the new G and B you'd use the LUTs you created for them:
newG = greenLUT(111,222,123);
newB = blueLUT(111,222,123);
Useing three 1-D luts to convert red into a new red, etc., would be good only if the colors didn't change in any way other than a brightness shift or stretch -- no hue change etc.

Sign in to comment.

More Answers (0)

Categories

Find more on Modify Image Colors in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!