We\'re trying to do the following in Mathematica - RMagick remove white background from image and make it transparent.
But with actual photos it ends up looking lous
I am completely new to image processing but here is what I get after some playing with new morphological image processing functions of version 8:
mask = DeleteSmallComponents[
ColorNegate@
Image[MorphologicalComponents[ColorNegate@img, .062,
Method -> "Convex"], "Bit"], 10000];
Show[Graphics[Rectangle[], Background -> Red,
PlotRangePadding -> None], SetAlphaChannel[img, ColorNegate@mask]]