What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Color calibration across multiple images


Herz_Aus_Stahl

New Member
Messages
3
Likes
0
Hi everyone,

I took a bunch for photos for a scientific documentation project outside in the shade throughout the day, resulting in significantly different lighting. I've attached the first and last photos of the day to illustrate the difference.

The challenge is to use the color strip to calibrate the images so that the colors are consistent in all of them. Note that the color strip was printed without any special attention to calibration, so the absolute values of the colors are not necessarily trustworthy. Also, for these purposes, the paper can be assumed to be pure white. Basically, the idea is to get the absolute calibration as accurate as possible, but really nail the relative calibration, so that the color strip and paper appear essentially identical in all the images. I've tried adjusting levels by sampling known white, grey, and black in the images, but that hasn't done the trick -- clearly a more sophisticated approach is required! That said, I have over 100 of these images to process, so a relatively straightforward solution would be appreciated, if possible.

Please let me know if you can help, and thanks in advance!
 

Attachments

  • 94vy.jpg
    94vy.jpg
    799.8 KB · Views: 4
  • ibvz.jpg
    ibvz.jpg
    715.5 KB · Views: 1
You're probably shooting auto white balance.
Learn how to set custom white balance with your camera and sent a custom white balance for each shot.
Also check out DataColor SpyderChecker Calibration System and X-Rite ColorChecker Passport.

Also, shoot RAW not JPG
 
Hello, Herz -

I'm sorry that I didn't see this thread when you first posted it. Color accuracy is a topic that I am particularly interested in.

Steve's suggestion about shooting in RAW with a full Macbeth / Xrite Color Checker standard in each frame is spot on if you had not already taken the photographs. BTW, if you shoot in RAW and have such a standard in each frame, it is unnecessary to perform a custom white balance at the time you take each photo. Doing so afterwards, back in the lab, using your raw converter software (eg, ACR, Raw Therapee, Capture One, Nikon Capture NX, etc.) is entirely equivalent (if not better) than doing it in the camera with a custom white balance.

Another very useful technique you could have employed would have been to use a professional flash (in manual mode) on your camera. This provides a strong light source of known, constant color and intensity which could have been easily set up to overpower any variations in ambient daylight.

FWIW, it turns out that one of the teams I am currently directing is trying to automate the classification of skin lesions based on photographs. To ensure color, brightness and contrast consistency from day to day and across many different types of skin, my team is employing three of the above suggestions: a flash, saving the data in RAW format, and then performing final small color and tonal adjustments in ACR.

However, as we say in the States, at this point, suggesting any of these things to you is a bit like suggesting to the farmer that he should close the door after the cows have already run out of the barn, LOL, so we have to deal with what we have: a bunch of JPGs.

You do have a few color patches in each frame, but unfortunately, the patches do not include any colors (eg, brown or tan) that are close to the colors of your core samples. As you will see, this is a very serious shortcoming.

If you had thousands of these to process, I would suggest that you find someone who knows Matlab and have them write a program for you using this toolbox:
http://www.vision.caltech.edu/bouguetj/calib_doc/ .

FYI, there is also a nice list of other image processing tools here:
http://www.mathtools.net/MATLAB/Image_Processing/index.html

However, since you only have around 100 images to process, and because you are missing brown/tan reference patches, I don't think the results using any post-processing method are going to be good enough for scientific purposes. So, my suggestion is that you first try a manual approach on some fraction of the 100 to see if it produces sufficiently accurate results.

I would suggest the following steps:

1. Take each of your photos into ACR and use the "color eyedropper" tool to try to make the G18 patch a neutral gray. This will be possible for some, but not all of your images. Even for the latter, just getting it closer to a neutral gray is better than doing nothing. Next, using the exposure slider in ACR, make the RGB readings of this patch in all of your images as close to a constant value (say, 180, 180, 180) as possible. Save the output of ACR for each image as a PSD file. Select one of these to be your "master". In other words, you will be trying to make the known colors in each of the other images match this one.

2. Display an image to be calibrated on the same layer (in PS) as the reference image.

3. My manual approach relies on a little-known, but very powerful color correction plugin called "Color Mechanic". Invoke the "Color Mechanic" plugin. One uses it by drawing arrows from a "starting" color to a "desired" color. Do this for each of the pairs of color patches in the two images being displayed. You should wind up with a transformation diagram that looks something like this:

1st_color_patch_corrections_entered_using_color_mechanic.jpg


The result of this color transformation is shown below.

94vy-tjm01-acr_ps01b_600px_wide-01.jpg

Note that the colors of each of the transformed color patches now almost perfectly matches the corresponding patch in the reference image, whereas the corresponding patch colors were far off before this step.

*HOWEVER*, because there were no browns or tans among the reference color patches, these, most important colors weren't well corrected -- in fact, because of this, they got much worse, not better! ! !

There is a way to partially work around this problem. If the color of the cardboard box in all your images is the same, one can try to use it as an ad-hoc color reference in this part of the spectrum. Unfortunately, some portions of the cardboard are in shadow, some are more directly illuminated, some areas have dust, other areas do not, some areas are illuminated by light reflected off of the samples, other areas are not.

So, to try to come up with some compromise, I selected three or four areas of the cardboard and performed an exactly analogous transformation on them as I did previously with the color patches. Also, so that the colors of the previously corrected color reference patches did not change when applying the new transformation, I locked these down with points without arrows emanating from them. The result is shown below.

94vy-tjm01-acr_ps01b_600px_wide-03_browns_and_tans.jpg

As you can see, the above procedure did, as you requested, make the color patches, and even the color of the cardboard match fairly well, but:

a) it looks like because of the lack of sufficient spread in the reference color patches, the procedure messed up the slightly off-gray cores;

b) a lot of experience using Color Mechanic is required;

c) the process is time intensive;

d) ad-hoc, non-quantitative color change decisions must be made; and,

e) unfortunately, I am fairly certain that this procedure somewhat compressed the browns and tans into a smaller range than they really have.

Nevertheless, it's up to you whether a procedure like this might be of sufficient accuracy for scientific / engineering purposes.

To be honest, if it was me, and there was the possibility of re-photographing the samples, I would do so (using the method described early in this post). It would undoubtedly be more accurate, and probably would take less time than trying to fix the problem in software, after the fact.

I hope this little demo was of some use to you.

Cheers,

Tom
 
Last edited:
PS - Upon reflection, if I were to try this again, I might try omitting the ACR step, and then reversing the order of the Color Mechanic steps, ie, starting by immediately correcting the browns and tans (based on the cardboard), then, as my last step, correcting the remainder of the color patches.

HTH,

Tom
 
And here's the result of removing the ACR step and working on the browns and tans before adjusting the "real" color reference patches to match. This is looking much more promising.

Tom
 

Attachments

  • 94vy-tjm01-browns_1st-composite-acr0-ps02b_sRGB_698px_hi_8bpc-02.jpg
    94vy-tjm01-browns_1st-composite-acr0-ps02b_sRGB_698px_hi_8bpc-02.jpg
    210.8 KB · Views: 18
Thank you, everyone, for the feedback, and thank you, Tom Mann, for an extremely useful post/tutorial. Your results are impressive! These images were shot under tight time constraints using borrowed equipment (with the understanding that significant work would need to be done in "post-production" to fix them), and, unfortunately, re-shooting is not an option. Tom, I'll be in touch by PM to discuss collaborating on this further.
 

Back
Top