batch image contrast/levels/brightness EQUALIZATION

Hi, i am writing an app for a 10K HD jpeg sequence. The problem is the that the original light environment is changing as hell.

is there a way to pick a sample frame, and ‘harmonize’ all the rest to that light?
i am not sure if its needed to be written in OF, maybe someone heard about an app what does exactly this?

a simple photoshop batch action doesnt really help here, because its not enough intelligent for it:)

thank you,

krisztián

maybe you can use imagemagick for that.

with imagemagick you can “measure” the overall brightness of a picture.

i just have used this function but imagemagick can do a lot more, so give it a try here: http://www.imagemagick.org/

thanks!!