tool: removing small isles from selection
In short, I'm looking for a tool, plug-in etc. which
collects all isles of a selection up to a certain size
(specified by maximum diameter or number of pixels) and
subtracts them from the selection.
When dealing with a scan of a text document, the following
problem often appears. Using the color or fuzzy selection
tool, most of the white and lightgray background can be
selected---with the exception of small isles of dirt (up to
several hundreds) which have almost the same color as the
characters. After inverting the selection, a tool would be
very helpful which removes all isolated regions of the
selection as long as they fall below a certain maximum
size. As the majority of the dirt is generally smaller than
the dot on the i or punctuation marks, such a method should
be quite efficient. After applying it, the remaining big
dirty regions may be removed from the selection, e.g., by
the lasso tool.
Though OCR would be in principle useful, I can't use it for
my documents. If there aren't any applicable tools, I would
be glad to hear about some hints for writing a .scm file. Is
there any appropriate extension as a good starting point
(I didn't find any)? How to write a loop for isolated
regions of a selection? Is there already a function for
measuring the diameter/area of a (isolated region of a)
selection?
Thanks in advance,
Max Montauk
______________________