image magick tricks

So, I had a couple of hundred images with the same background but people were in it in various places, I wanted to get the “average” background .. basically, getting the people out of the picture.

You need to have multiple pictures of the exact same thing for this to work. Photoshop has a thing called “image statistics” with an option called “median”.

convert *.jpg -evaluate-sequence median OUT.jpg

Then I wanted to remove some black things from the image and just replace them with white. Since there was a lil’ bit of “black-ish” around the black, the -fuzz helped.

convert OUT.jpg -fuzz 18% -fill white -opaque black OUT2.jpg

Leave a Reply

Your email address will not be published. Required fields are marked *