Say I have an image that looks like this:
I fail to see what approach I could take in order to modify the picture so that all the background color surrounding the image is gone. So, a potential result would be this:
As you can see the white background has been cut out and now is about 2 pixels from the actual shoes.
I don't have just shoes, but I am looking for an algorithm that would let me do that. I am using Ruby and Minimagick, but I guess that first step would be to figure it out the algorithm that I could use.
EDIT: The background is not necessary white.