Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Auto adjust colors so that second image colors matches
#1
Disclaimer: Before posting this thread, I realized I don't know exact to express the problem so that it give sense. I give it a shot anyway.

Situation: I have to photos that are taken by help of a tripod, delayed some seconds from each other. The point is there is a moving object so that I'll plan to put the latest photo as a layer above, make a mask and then draw the mask so that only one subject are visible. I've done similar before (same moving bike appear several times on same image).

However, there is a minor problem that occur quite often. If the camera re-adjust between the photos taken, the colors may be too different to be usable without manually tweaking. This always work but takes extra time, and I might regret afterwards (because adjusted too much or less) when it is too late and I have to do every thing over again to fix the outcome.

Here is the question. When I do have two images in Gimp, same image/motive but when the second image was taken, background/ambient light was causing the camera to re-adjust. Then, is there a method that make it possible to select a region (or whole image area) and then say that image1 should be the base, and Image2 would auto-adjust so that all the pixel colors in image2 transforms in such a way that it color-wise matches image1 as close as possible ?
Reply
#2
What I tried:
  • Pick up a "raw" picture in my collection, and load in RawTherapee
  • Output two pictures as JPEG, one with no exposure correction, and one slightly more exposed
  • Load these in Gimp as layers
  • Set the top on to "Difference" mode
  • Start Colors > Exposure and try to make the difference as dark as possible.
Doesn't work too well: I can't make the whole picture go dark, some areas brighten before other are finished darkening. Tried with Curves and I get better results (darker difference), but that requires some tweaking. I suspect that the exposure fix is distorted by the gamma correction.

Also tried to use Colors > Auto > Equalize on both pictures. This works fine from the point of view of having both image look the same, but they both look awful...

What I would try if you take the pictures "raw":
  • Looking at the EXIF you can tell exactly the exposure value (EV) of each pic, and therefore compute the difference. 
  • Your demosaicing app very likely has an exposure compensation slider with EV values, so you can correct one of the pictures
  • Possibly some auto-exposure on both images could give better results in that app than in Gimp.
Reply
#3
I would put the camera in manual mode. You don't want the camera changing settings if the lighting hasn't changed which it likely hasn't in such a short time.
Reply
#4
(10-03-2022, 01:40 AM)zeuspaul Wrote: I would put the camera in manual mode. . .
Yes I know this, and it doesn't solve the problem because some photos may be taken within the time frame of an once event only (manual mode forgotten or used a very user friendly camera / cell phone as source), or the images can be taken by somebody else (i.e the shot cannot be repeated ever again).

The problem lies in when I already have the image files, and I also may or may not have all exif data.

To clear up: I'm only interested in a technique within Gimp (if exist / is possible) to solve this problem. But, yes, I do use manual settings on camera when applicable, the question relates to the instances where this wasn't done for some unrelated reason.
Reply
#5
Try this with the two photos : https://github.com/samrocketman/home/blo..._match.scm

Channels to use : 'LAB - Preserve Luma' or 'YCbCr - Preserve luma'
Reply
#6
Thumbs Up 
(10-03-2022, 04:20 PM)denzjos Wrote: Try this with the two photos : https://github.com/samrocketman/home/blo..._match.scm

Channels to use : 'LAB - Preserve Luma' or 'YCbCr - Preserve luma'

Yess, yess - this is perfect, exactly what I I wanted to do, thank you so very much   Big Grin  Big Grin Big Grin 

Problem solved Cool


[edit]
Is there a way to flag this post as solved? Cannot see any options for that and cannot edit first post either.
Reply


Forum Jump: