[magick-users] Magic wand function in ImageMagick?

Alec Resnick aresnick at MIT.EDU
Tue Jun 19 20:31:11 PDT 2007


Good day!  I'm a bit new to ImageMagick, and I was wondering: I have  
~10k pictures with a red background.  It's not perfectly red--they're  
photos taken on top of a piece of red backdrop.  And I'd like to  
remove this red backdrop.  Selecting by color is feasible, but  
doesn't do exactly what I want, since the portion I want to remove is  
contiguous, I'd like to take advantage of this fact.

So is there a way to mimic the magic wand/fuzzy select function in  
Magick?  Something where I could indicate a "start pixel" and a  
threshold?

For reference, here's the best output I can achieve with selection by  
color (I've filled in the selected area, rather than remove, for  
comparison's sake).  Note the red missed at the bottom of the paper.

via
convert -fill "#80c0e0"  -fuzz 17% -opaque "#B54F50"  
magick_before.jpg magick_after.jpg

Original image: http://web.mit.edu/~aresnick/Public/magick_before.jpg
Modified image: http://web.mit.edu/~aresnick/Public/magick_after.jpg

Thanks for your help!


Gratefully,
a.



More information about the Magick-users mailing list