Page 1 of 1

Tips on Background Removal

Posted: 2008-08-21T15:12:49-07:00
by dognose
I've been looking at removing backgrounds in images. Of course, this is a difficult process, and more that just a
simple setting.

Some of the pro style tools work like this:

Image

by either marking the background or the foreground or both.

I've tried the -draw floodfill with a fuzz factor, and that works pretty good.

Are there anyways I could improve that?

Re: Tips on Background Removal

Posted: 2008-08-21T16:19:12-07:00
by anthony
It is hard to see exactly just what that tool is doing without getting a closeup of the pixels along the edge before and after the background has been removed.

However roughly what it is doing is some type of fuzz threshold removal of colors that was near the center of the circle in the original image.

A GUI type tool like this however is not well suited to a cbatch tool like ImageMagick. But there are ways to even do that.

On of the tools I am currently programming is a tool to take a set of random points and attempt to generate a smooth gradient between them. This can be used re-create the background that is under the edge of the original image, allowing you to subtract the background from the image, using the various background removal techniques.

All that would then be required is to specify enough points that are close to the edge but which you definably class as being background, and some appropriate 'fuzz' factors (for either threshold, or better still a double masking method, for an anti-aliased background removal.

As a start point read the techniques in the link I gave above.