Page 1 of 1

Remove pimple?

Posted: 2010-10-14T13:28:03-07:00
by Sam.B
How would I go about removing a pimple with imagemagick, or any blemish (assuming I know the location and size)? Is it even possible?

What commands should I use?

Thanks!

Re: Remove pimple?

Posted: 2010-10-14T14:12:38-07:00
by fmw42
You would probably need to make a binary mask of the blemish area, probably blur it a little for anti-aliasing or blending-in, then blur the whole image to soften the blemish, then composite the two images together with the mask so that where there was no blemish you used the original image and where there was a blemish you used the blurred image.

Alternately, you could try cutting out a piece of the image of similar skin tones about the size of the blemish, again make a blureed mask and then composite the cut-out using the mask back over the blemish part of the original image.

It might be best if you provide a link to an example image so others could help you with the exact commands.

See
http://www.imagemagick.org/Usage/compose/#compose
http://www.imagemagick.org/Usage/layers/#convert
http://www.imagemagick.org/Usage/channe ... antialised
http://www.imagemagick.org/Usage/compose/#mask
http://www.imagemagick.org/Usage/blur/#feathering

also
viewtopic.php?f=1&t=17072&start=0