I need to remove background of multiple images, i try with this code:
Code: Select all
composite -compose difference overlay.jpg background.jpg diff.png
convert diff.png -threshold 2600 mask.png
convert overlay.jpg mask.png -alpha off -compose CopyOpacity -composite Final.png
example:
original
background
Result:
Although, How i can convert this code for a batch?
But i don´t know how to use mogrify.
Thank you very much.