Homogenize exposure brightness and white balance

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
mrremo
Posts: 1
Joined: 2018-05-29T04:36:13-07:00
Authentication code: 1152

Homogenize exposure brightness and white balance

Post by mrremo »

I've taken thousands of photos on a long-term project and I'm doing a time-lapse film.

Due to the different weather and the different light conditions the pictures are partly very differently exposed. The colours are also different. Here are a few examples:

https://pasteboard.co/HnpsUAX.jpg
https://pasteboard.co/HnpthNi.jpg
https://pasteboard.co/HnptK6s.jpg
https://pasteboard.co/Hnpu4iP.jpg
https://pasteboard.co/HnpulWX.jpg

I already adapted the pictures a little bit with the following command:

Code: Select all

convert -auto-gamma -unsharp 1x1+1.7+0.02
Unfortunately you can still see big differences in the time-lapse video.
Is there a way to homogenize the images with ImageMagick or other software under Linux?
Sorry for my English.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Homogenize exposure brightness and white balance

Post by snibgo »

Your photos have the camera pointing in different directions. I suggest you first align the photos so the same features are at the same coordinates, probably with a perspective transformation. I show some methods in Simple alignment by matching areas and Alignment by matching points

Then you can adjust the colour and tones of each image to match some reference. This means: (1) get statistics about each image (eg mean and standard deviation, or a histogram, etc) and (2) adjust each image so the statistics match.

For the statistics, you could use the overall average of each image, but the large shadow in some images will cause problems. I expect the result will be better if you use statistics from a crop of each image, the same crop from each aligned image, of an area outside the large shadow.

For some methods, see: Gain and bias, Set mean and stddev, matching histograms and some other pages.
snibgo's IM pages: im.snibgo.com
Post Reply