Remove pimple?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Sam.B

Remove pimple?

Post 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!
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Remove pimple?

Post 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
Post Reply