Gimp-Forum.net
Color correct image based on known background color - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: General questions (https://www.gimp-forum.net/Forum-General-questions)
+--- Thread: Color correct image based on known background color (/Thread-Color-correct-image-based-on-known-background-color)



Color correct image based on known background color - pluder - 09-23-2023

Maybe this is a good idea, maybe not. 

I take pictures of different objects on the same background, with the same light source and intensity all the time. I use Gimp to edit those pictures. The camera will vary exposure, aperture, ISO, etc... depending on the object which will change the apparent color of the background. 

If I know the actual color of the background (say 90.7, 85.8, 85.8 in a RBG format) how would I apply a filter to color correct the entire image based on the change needed between the current background color and the known background value?

I am looking to try and get the most consistent/accurate colors for the objects. If this is not a good option, please let me know if you think there is a better way to do this. Bear in mind that I am really trying to make up for the camera and getting a better/different camera is not a viabile option at this time.


RE: Color correct image based on known background color - denzjos - 09-23-2023

Use this for the background : https://patdavid.net/2012/07/getting-around-in-gimp-more-color/. Please note, the color on the rest of the photo also change. To avoid this you can use layer masks/selection on the object.


RE: Color correct image based on known background color - Ofnuts - 09-23-2023

Usually this is a problem of color temperature.

So you can set a Sample point on a pixel of the color and use the  Intended temperature slider in Colors ➤ Color temperature to get as close as possible to the required color.

Usually to try to find something  neutral gray/white in the picture and make it as close as possible to gray (R=G=B). For instance in the image below, the background color is a bit blue (so the image is a bit "cold").


[attachment=10384]

You will note that points 1 & 2 are good candidates because their Red/Blue values are about symmetrical around the Green. Point 3 is a lousy pick for this purpose.

Then you tweak the intended color to get as close as possible to R=G=B in the sample points:

[attachment=10385]

If you have a neutral gray/white color in your picture you can use this script.

Otherwise if you know the color temperature of the source you can use both sliders in Colors ➤ Color temperature.