When making animated gifs or short stop-motion videos from an image sequence, I want them to have all similar levels so that the output looks smooth. It does not have to be a professional quality result, just a simple command to adjust for the different photographs having slightly different exposure variables which causes flickering in the animation.

So, I'm looking for a simple command line way to make a sequence of images normalised to approximately similar levels.

  • Please specify your operating system and version. – K7AAY Oct 23 '13 at 22:27
  • It's Ubuntu 13.10 – wim Oct 23 '13 at 22:45
  • There IS a normalize function in imagemagick (and also graphicsmagick). Whether it will give you desirable results is difficult to say. However, do have a look at this discussion. – Rajib Oct 25 '13 at 11:14

Choose one of the images that has good levels. Use the imagemagick script histmatch to adjust the histograms of the other images to match that one's; or use bcmatch to adjust only brightness and contrast.

Call e.g. histmatch good_in.bmp ith_in.bmp ith_out.bmp from within a loop, in whatever language you like: bash, perl, python, ruby, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.