4.5.3.2 The Threshold Tool Versus the Magic Wand
The Magic Wand, presented in Section
3.1.1, is
very similar in principle to Threshold but not nearly as
effective. As already described, the Magic Wand works by
choosing a seed pixel in the image and interactively setting a
threshold that controls how many pixels around the seed are included
in the selection. Thus, if the value of the pixel at the seed is S,
and the value of the threshold is T, then the range of pixel values
that are included in the selection is [S-T,S+T].
Now suppose that the range of pixel values that separates the subject
from the background is [R1,R2]. To make the Magic Wand work
on this image, the threshold must have the value
T=(R2-R1)/2 and
the seed must have the value
S=(R1+R2)/2. The problem, then, is
finding a pixel in the subject having the correct seed value that,
when experimenting with threshold values, will produce an acceptable
result. This is impractical for several reasons, the main difficulty
being that there is no way to use the visual feedback from several
tries of the Magic Wand to discover a more refined solution.
On the other hand, Threshold requires only that the end points
of the range be specified, so it's much better adapted to
experimentation. It is easy to try several contiguous value-regions,
and the visual feedback from this is very useful for improving the
search. In addition, the histogram in the Threshold dialog
provides important clues as to which regions may be most useful.
Finally, the algorithm used by the Magic Wand is slow, because
for each change in the threshold value, it must recursively grow the
selected region around the seed. In comparison, the algorithm for
Threshold is very fast, because it must only compare each pixel in
the image with a threshold.