Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Grokking The Gimp
Previous Page Home Next Page

      
3.1.1.3 The Magic Wand (the Fuzzy Select Tool)

Although its name is officially the Fuzzy Select tool, the Magic Wand will be preferred in this book because the tool's icon, as shown in the Toolbox, resembles a magic wand. The Magic Wand makes selections based on specifying a seed pixel in the image. The seed is the first selected pixel, and the pixels directly adjoining the seed are included in the selection if their colors are sufficiently close to the color of the seed. This creates a second set of selected pixels. This process is repeated with the neighboring pixels of the second selected set, and so on, until no more pixels can be added.

Figure  3.5 illustrates how the Magic Wand works.

  
Figure 3.5: A Magic Wand Seed Pixel and Selection
Figure 3.5

Figure  3.5(a) shows a smoothly-varying, radial gradient of pixel values going from black at the center to white at the edges. The location where the seed was chosen with the mouse is indicated. The resulting ring-like region selected by the Magic Wand is shown by the Marching Ants. The ring selection is equally thick on both sides of the seed because the Magic Wand includes pixels that have both higher and lower color values than the seed's.

So, how much lower and higher can adjoining pixel colors be and still be included in the selection? This is specified by the Magic Wand's selection threshold, which, as shown in Figure  3.5(b), can be set with the Threshold slider in the Tool Options dialog  (see Section  3.1.2 for more on this). It can also be set interactively with the mouse. The threshold is set interactively by keeping the left mouse button pressed when selecting the seed pixel. When the outline of the selection appears, and with the left mouse button continually pressed, the mouse can be moved either to the right (or downward) to increase the threshold or to the left (or upward) to diminish it. Increasing the threshold results in a larger selection, and decreasing it, a smaller one. Changing the threshold should be done by moving the mouse in small increments so that the changes in the selected region can be carefully controlled.

The Magic Wand is a conceptually attractive tool. In principle, it automatically makes the selection by grouping pixels that are similar in color and that are spatially connected, being grown from a seed pixel. In practice, however, it is often difficult to get good results with the Magic Wand. This is because it is hard to find the seed pixel and threshold pair that will produce the selection we want. As an example, imagine a subject you want to select using the Magic Wand and that has pixel color values ranging from X to Y. To make the selection with the Magic Wand, a pixel whose value is exactly midway between X and Y must be selected as the seed. But how do we determine what X and Y are for our subject, and how do we find the pixel in the subject that has the midway value? These practical problems are not easily solved!

Fortunately there is another tool in the GIMP that allows you to more easily exploit the color-grouping selection concept. This tool is called Threshold and is found in the Image:Image/Colors menu. Its use is presented in Section  4.5.3.

Grokking The Gimp
Previous Page Home Next Page


 
 
  Published under the terms of the Open Publication License Design by Interspire