Normalize colors under different lighting conditions

I have done an outdoor experiment of a camera capturing images every 1 hour for color checker chart. I am trying to normalize each color so it looks the same through the day; as the color constancy is intensity independent.
I have tried several methods but the results were disappointing. Any ideas?
Thanks

 Accepted Answer

What methods did you try? Did you try cross channel cubic linear regression?

9 Comments

I tried normalization for RGB channels user comprehensive color normalization
No, I haven't tried cross channel cubic linear regression.
Try an equation like
newR = a0 + a1*R + a2*G + a3*B + a4*R*G + a5*R*B + a6*G*B + a7*R^2 + a8*G^2 + a9*B^2 + .....
See my attached seminar/tutorial on RGB-to-RGB color correction and RGB-to-LAB color calibration.
Thank you, this method looks complicated whereas my application is simple. The only thing I want to do is to normalize a color throughout the day. For example, red through the day is shown as [black - brown - red - pink - white - pink - red - brown - black]. I want to stabilize this color to be red during the day. The data was taken from a CMOS imaging sensor.
Attached is a super simple (dumb) way of doing it. Not too sophisticated and won't be as good in all situations but it might work for you. I would never use it though because it's not as accurate as we need for industrial use. It's more just for students to learn from.
Thank you for this file. But this code converts colors to grey scale after correction. I want the result image to be colored
The result image is colored. Did you actually run it? With the onion image? And draw out a square over the yellowish onion? You'll see that the final corrected image is color. Try again. Post screenshots if you need to.
I don't know why you're processing each quadrilateral individually. Whatever happened to the image (lighting color shift, overall intensity shift, introduction of haze or whatever) most likely affected the whole image. I think if you processed each quadrilateral individually and then came up with 24 individual transforms, and then applied those individual transforms to the same area in the subject image, your subject image would look very choppy. So if your mid gray chip went from greenish in the morning to gray in the mid-day to bluish in the evening, those color shifts would apply to all chips. I've seen a lot of talks and posters at a lot of color conferences and talked to a lot of the worlds experts in color and I don't recall ever seeing anyone do what you want to do. There are situations in spectral estimation where you have a mixture of light (e.g. indoor fluorescent and outdoor daylight) both impinging on a scene and they want to estimate the percentage of light hitting different parts of the scene and the resultant spectrum so that you can get accurate color correction across the different illumination regions but you can't do that on something as small as a single X-rite Color Checker Chart. Anyway even if you did want to chop your scene up into 24 parts and have 24 transforms to fix up each of the 24 regions independently, you'd still have to do one of the methods I showed - either the more accurate regression, or the less accurate linear scaling - or something basically the same concept. You need a transform that take the R, G, and B and gives you a "fixed up" red. And another transform to fix green, and another transform to fix the blue.
Thank you very much.
Hello,
I am trying to take pictures using cellphones under various lighting conditions which would cause color distortions. Hence some kind of white balance algorithm is needed to correct the lighting of those photos so we get the standardized color. This can be commonly done if you have a "gray card" which many photographers use to tell their cameras what is the true white color under any light. With the "gray card", a person can take a picture with a standard color item by the side. With the item's color as a reference, we hope we can standardize the picture's color. We are doing this for an excellent color normalization.
Do you know any readily available algorithms (or something we can modify) for the above purpose? I really appreciate if you can offer any suggestions.
Thanks.

Sign in to comment.

More Answers (0)

Categories

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

Asked:

on 6 Nov 2013

Commented:

on 24 Apr 2020

Community Treasure Hunt

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

Start Hunting!