2

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.

wim
  • 3,087
  • 5
  • 42
  • 57
  • 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](http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=23545) discussion. – Rajib Oct 25 '13 at 11:14

1 Answers1

3

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.

Camille Goudeseune
  • 2,297
  • 4
  • 32
  • 41