home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / gimp / 2.0 / help / en / gimp-tool-threshold.html < prev    next >
Encoding:
Extensible Markup Language  |  2008-05-03  |  15.4 KB  |  375 lines

  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4.   <head>
  5.     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  6.     <title>5.5.¬† Threshold</title>
  7.     <link rel="stylesheet" href="gimp-help-plain.css" type="text/css" />
  8.     <link rel="stylesheet" href="gimp-help-screen.css" type="text/css" />
  9.     <link rel="stylesheet" href="gimp-help-custom.css" type="text/css" />
  10.     <link rel="alternate stylesheet" href="gimp22.css" type="text/css" title="gimp22" />
  11.     <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
  12.     <link rel="start" href="index.html" title="GNU Image Manipulation Program" />
  13.     <link rel="up" href="gimp-tools-color.html" title="5.¬† Color Tools" />
  14.     <link rel="prev" href="gimp-tool-brightness-contrast.html" title="5.4.¬† Brightness-Contrast tool" />
  15.     <link rel="next" href="gimp-tool-levels.html" title="5.6.¬† Levels" />
  16.   </head>
  17.   <body>
  18.     <div class="navheader">
  19.       <table width="100%" summary="Navigation header">
  20.         <tr>
  21.           <th colspan="3" align="center">5.5.¬†
  22.     <span lang="en" xml:lang="en">Threshold</span>
  23.   </th>
  24.         </tr>
  25.         <tr>
  26.           <td width="20%" align="left"><a accesskey="p" href="gimp-tool-brightness-contrast.html"><img src="../images/prev.png" alt="Prev" /></a>¬†</td>
  27.           <th width="60%" align="center">5.¬†
  28.     <span lang="en" xml:lang="en">Color Tools</span>
  29.   </th>
  30.           <td width="20%" align="right">¬†<a accesskey="n" href="gimp-tool-levels.html"><img src="../images/next.png" alt="Next" /></a></td>
  31.         </tr>
  32.       </table>
  33.       <hr />
  34.     </div>
  35.     <div class="sect2" lang="en" xml:lang="en">
  36.       <div class="titlepage">
  37.         <div>
  38.           <div>
  39.             <h3 class="title"><a id="gimp-tool-threshold"></a>5.5.¬†
  40.     <span lang="en" xml:lang="en">Threshold</span>
  41.   </h3>
  42.           </div>
  43.           <div>
  44.             <div class="revhistory">
  45.               <table border="1" width="100%" summary="Revision history">
  46.                 <tr>
  47.                   <th align="left" valign="top" colspan="3">
  48.                     <b>Revision History</b>
  49.                   </th>
  50.                 </tr>
  51.                 <tr>
  52.                   <td align="left">Revision $Revision: 2429 $</td>
  53.                   <td align="left">2008-01-05</td>
  54.                   <td align="left">j.h</td>
  55.                 </tr>
  56.               </table>
  57.             </div>
  58.           </div>
  59.         </div>
  60.       </div>
  61.       <a id="id2644937" class="indexterm"></a>
  62.       <a id="id2644952" class="indexterm"></a>
  63.       <p>
  64.     The Threshold tool transforms the current layer or the selection into a
  65.     black and white image, where white pixels represent the pixels of the
  66.     image whose Value is in the threshold range, and black pixels represent
  67.     pixels with Value out of the threshold range.
  68.   </p>
  69.       <p>
  70.     You can use it to enhance a black and white image (a scanned text for
  71.     example) or to create selection masks.
  72.   </p>
  73.       <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
  74.         <table border="0" summary="Note">
  75.           <tr>
  76.             <td rowspan="2" align="center" valign="top" width="25">
  77.               <img alt="[Note]" src="../images/note.png" />
  78.             </td>
  79.             <th align="left">Note</th>
  80.           </tr>
  81.           <tr>
  82.             <td align="left" valign="top">
  83.               <p>
  84.       As this tool creates a black and white image, the anti-aliasing of the
  85.       original image disappears. If this poses a problem, rather use the
  86.       <a class="link" href="gimp-tool-levels.html" title="5.6.¬† Levels">Levels </a> tool.
  87.     </p>
  88.             </td>
  89.           </tr>
  90.         </table>
  91.       </div>
  92.       <div class="sect3" lang="en" xml:lang="en">
  93.         <div class="titlepage">
  94.           <div>
  95.             <div>
  96.               <h4 class="title"><a id="id2644999"></a>5.5.1.¬†
  97.       <span lang="en" xml:lang="en">Activate the Tool</span>
  98.     </h4>
  99.             </div>
  100.           </div>
  101.         </div>
  102.         <p>
  103.       You can access this tool from the image menu through
  104.       <span class="guimenu"><span class="accel">T</span>ools</span> ‚Üí <span class="guisubmenu"><span class="accel">C</span>olor Tools</span> ‚Üí <span class="guimenuitem"><span class="accel">T</span>hreshold,</span>,
  105.     </p>
  106.         <p>
  107.       or through
  108.       <span class="guimenu">Colors</span> ‚Üí <span class="guimenuitem">Threshold</span>,
  109.     </p>
  110.         <p>
  111.       or by clicking on the
  112.       <span class="guiicon">
  113.         <span class="inlinemediaobject"><img src="../images/toolbox/stock-tool-threshold-22.png" /></span>
  114.       </span>
  115.       icon in Toolbox if this tool has been installed in it. You can do
  116.       that through the <a class="link" href="gimp-dialogs-misc.html#gimp-tools-dialog" title="5.1.¬† Tools Dialog">Tool dialog</a>.
  117.     </p>
  118.       </div>
  119.       <div class="sect3" lang="en" xml:lang="en">
  120.         <div class="titlepage">
  121.           <div>
  122.             <div>
  123.               <h4 class="title"><a id="id2645101"></a>5.5.2.¬†
  124.       <span lang="en" xml:lang="en">Options</span>
  125.     </h4>
  126.             </div>
  127.           </div>
  128.         </div>
  129.         <div class="figure">
  130.           <a id="id2645112"></a>
  131.           <p class="title">
  132.             <b>Figure¬†13.123.¬†
  133.         <span lang="en" xml:lang="en">Threshold tool options</span>
  134.       </b>
  135.           </p>
  136.           <div class="figure-contents">
  137.             <div class="mediaobject">
  138.               <img src="../images/toolbox/tools-threshold.png" alt="Threshold tool options" />
  139.             </div>
  140.           </div>
  141.         </div>
  142.         <br class="figure-break" />
  143.         <div class="variablelist">
  144.           <dl>
  145.             <dt>
  146.               <span class="term">Threshold range</span>
  147.             </dt>
  148.             <dd>
  149.               <p>
  150.             The Threshold tool provides a visual graph, a histogram, of the
  151.             intensity value of the active layer or selection. You can set the
  152.             threshold range either using the input boxes or clicking button 1
  153.             and dragging on the graph. It allows you to select a part of the
  154.             image with some intensity from a background with another
  155.             intensity. Pixels inside the range will be white, and the others
  156.             will be black. Adjust the range to get the selection you want in
  157.             white on black background.
  158.           </p>
  159.             </dd>
  160.             <dt>
  161.               <span class="term">Preview</span>
  162.             </dt>
  163.             <dd>
  164.               <p>
  165.             The Preview toggle allows dynamic updating of the active layer or
  166.             selection while changes are made to the intensity level.
  167.           </p>
  168.             </dd>
  169.           </dl>
  170.         </div>
  171.       </div>
  172.       <div class="sect3" lang="en" xml:lang="en">
  173.         <div class="titlepage">
  174.           <div>
  175.             <div>
  176.               <h4 class="title"><a id="id2645192"></a>5.5.3.¬†
  177.       <span lang="en" xml:lang="en">
  178.         Using Threshold and Quick Mask to create a selection mask
  179.       </span>
  180.     </h4>
  181.             </div>
  182.           </div>
  183.         </div>
  184.         <p>
  185.       That's not always the case, but an element you want to extract from
  186.       an image can stand out well against the background. In this case,
  187.       you can use the Threshold tool to select this element as a whole.
  188.       Grokking the GIMP described a method based on a channel mask, but now,
  189.       using the <a class="link" href="gimp-image-window-qmask-button.html" title="3.¬† QuickMask">Quick mask
  190.       </a> is easier.
  191.     </p>
  192.         <div class="procedure">
  193.           <ol type="1">
  194.             <li>
  195.               <p>
  196.           First start decomposing you image into its RGB and HSV components by
  197.           using the <a class="link" href="plug-in-decompose-registered.html" title="11.16.¬† Decompose">Decompose</a> filter. A
  198.           new grey-scaled image is created and the components are displayed as
  199.           layers in the Layer Dialog. These layers come with a thumbnail but
  200.           it is too small for an easy study. You can, of course, increase the
  201.           size of this preview with the dialog menu (the small triangular
  202.           button), but playing with the ‚Äú<span class="quote">eyes </span>‚Äù is more simple to
  203.           display the wanted layer in the decompose image. Select the layer
  204.           that isolates the element the best.
  205.         </p>
  206.               <div class="figure">
  207.                 <a id="id2645259"></a>
  208.                 <p class="title">
  209.                   <b>Figure¬†13.124.¬†
  210.             <span lang="en" xml:lang="en">
  211.               The original image, the decompose image and its Layer Dialog
  212.             </span>
  213.           </b>
  214.                 </p>
  215.                 <div class="figure-contents">
  216.                   <div class="mediaobject">
  217.                     <img src="../images/using/threshold-orig.png" alt="The original image, the decompose image and its Layer Dialog" />
  218.                   </div>
  219.                   <div class="mediaobject">
  220.                     <img src="../images/using/threshold-decomp.png" alt="The original image, the decompose image and its Layer Dialog" />
  221.                   </div>
  222.                   <div class="mediaobject">
  223.                     <img src="../images/using/threshold-layers.png" alt="The original image, the decompose image and its Layer Dialog" />
  224.                   </div>
  225.                 </div>
  226.               </div>
  227.               <br class="figure-break" />
  228.             </li>
  229.             <li>
  230.               <p>
  231.           Call the Threshold tool from the decompose image. By moving the
  232.           black cursor, fit threshold to isolate the best the element you want
  233.           to extract. This will probably not be perfect: we will enhance the
  234.           result with the selection mask we are going to create.
  235.         </p>
  236.               <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
  237.                 <table border="0" summary="Warning">
  238.                   <tr>
  239.                     <td rowspan="2" align="center" valign="top" width="25">
  240.                       <img alt="[Warning]" src="../images/warning.png" />
  241.                     </td>
  242.                     <th align="left">Warning</th>
  243.                   </tr>
  244.                   <tr>
  245.                     <td align="left" valign="top">
  246.                       <p>
  247.             Make sure you have selected the right layer when you call the
  248.             Threshold tool: when it is opened, you can't change to another
  249.             layer.
  250.           </p>
  251.                     </td>
  252.                   </tr>
  253.                 </table>
  254.               </div>
  255.               <div class="figure">
  256.                 <a id="id2645340"></a>
  257.                 <p class="title">
  258.                   <b>Figure¬†13.125.¬†
  259.             <span lang="en" xml:lang="en">The selected layer after threshold fit</span>
  260.           </b>
  261.                 </p>
  262.                 <div class="figure-contents">
  263.                   <div class="mediaobject">
  264.                     <img src="../images/using/threshold-fit.png" alt="The selected layer after threshold fit" />
  265.                     <div class="caption">
  266.                       <p>
  267.                 We got the best outline for our flower. There are several red
  268.                 objects which we must remove.
  269.               </p>
  270.                     </div>
  271.                   </div>
  272.                 </div>
  273.               </div>
  274.               <br class="figure-break" />
  275.             </li>
  276.             <li>
  277.               <p>
  278.           Make sure the image displaying the selected layer is active and
  279.           copy it to the clipboard with
  280.           <span class="keycap"><strong>Ctrl</strong></span>+<span class="keycap"><strong>C</strong></span>.
  281.         </p>
  282.             </li>
  283.             <li>
  284.               <p>
  285.           Now, make the original image active. Click on the
  286.           <span class="guibutton">Quick Mask</span> button at the bottom-left corner
  287.           of the image window: the image gets covered with a red (default)
  288.           translucent mask. This red color does not suit well to our image
  289.           with much red: go to the Channel Dialog, activate the
  290.           ‚Äú<span class="quote">Quick mask</span>‚Äù channel and change this color with the
  291.           <span class="guibutton">Edit Channel Attributes</span>. Come back to the
  292.           original image. Press
  293.           <span class="keycap"><strong>Ctrl</strong></span>+<span class="keycap"><strong>V</strong></span> to
  294.           paste the previously copied layer.
  295.         </p>
  296.               <div class="figure">
  297.                 <a id="id2645454"></a>
  298.                 <p class="title">
  299.                   <b>Figure¬†13.126.¬†
  300.             <span lang="en" xml:lang="en">The mask</span>
  301.           </b>
  302.                 </p>
  303.                 <div class="figure-contents">
  304.                   <div class="mediaobject" align="center">
  305.                     <img src="../images/using/threshold-mask.png" align="middle" alt="The mask" />
  306.                   </div>
  307.                 </div>
  308.               </div>
  309.               <br class="figure-break" />
  310.             </li>
  311.             <li>
  312.               <p>
  313.           Voil√†. Your selection mask is ready: you can improve the selection
  314.           as usually. When the selection is ready, disable the Quick mask by
  315.           clicking again on its button: you will see the marching ants around
  316.           the selection.
  317.         </p>
  318.               <div class="figure">
  319.                 <a id="id2645503"></a>
  320.                 <p class="title">
  321.                   <b>Figure¬†13.127.¬†
  322.             <span lang="en" xml:lang="en">The result</span>
  323.           </b>
  324.                 </p>
  325.                 <div class="figure-contents">
  326.                   <div class="mediaobject">
  327.                     <img src="../images/using/threshold-result.png" alt="The result" />
  328.                   </div>
  329.                   <div class="mediaobject">
  330.                     <img src="../images/using/threshold-selection.png" alt="The result" />
  331.                   </div>
  332.                 </div>
  333.               </div>
  334.               <br class="figure-break" />
  335.               <p>
  336.           We used the Zoom to work at a pixel level, the Lasso to remove large
  337.           unwanted areas, the pencil (to get hard limits), black paint to
  338.           remove selected areas, white paint to add selected areas, especially
  339.           for stem.
  340.         </p>
  341.             </li>
  342.           </ol>
  343.         </div>
  344.       </div>
  345.     </div>
  346.     <div class="navfooter">
  347.       <hr />
  348.       <table width="100%" summary="Navigation footer">
  349.         <tr>
  350.           <td width="40%" align="left"><a accesskey="p" href="gimp-tool-brightness-contrast.html"><img src="../images/prev.png" alt="Prev" /></a>¬†</td>
  351.           <td width="20%" align="center">
  352.             <a accesskey="u" href="gimp-tools-color.html">
  353.               <img src="../images/up.png" alt="Up" />
  354.             </a>
  355.           </td>
  356.           <td width="40%" align="right">¬†<a accesskey="n" href="gimp-tool-levels.html"><img src="../images/next.png" alt="Next" /></a></td>
  357.         </tr>
  358.         <tr>
  359.           <td width="40%" align="left" valign="top"><a accesskey="p" href="gimp-tool-brightness-contrast.html">5.4.¬†
  360.     <span lang="en" xml:lang="en">Brightness-Contrast tool</span>
  361.   </a>¬†</td>
  362.           <td width="20%" align="center">
  363.             <a accesskey="h" href="index.html">
  364.               <img src="../images/home.png" alt="Home" />
  365.             </a>
  366.           </td>
  367.           <td width="40%" align="right" valign="top">¬†<a accesskey="n" href="gimp-tool-levels.html">5.6.¬†
  368.     <span lang="en" xml:lang="en">Levels</span>
  369.   </a></td>
  370.         </tr>
  371.       </table>
  372.     </div>
  373.   </body>
  374. </html>
  375.