As I am realising a timelapse film, I've taken thousands of photos of a set and due to the different weather and light conditions the pictures are very differently exposed from sunshine to haze and rain.
I am looking for a way to generalise the white balance of all the images in order to have a timelapse as smooth as possible using python.
I already tried using defilcekr filter and correcting the white balance using a variable, but I couldn't find a way to generelise the parameters to all the images of different conditions.
here are some examples of the images I have :






