home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <title>5.4.  NL Filter</title>
- <link rel="stylesheet" href="gimp-help-plain.css" type="text/css" />
- <link rel="stylesheet" href="gimp-help-screen.css" type="text/css" />
- <link rel="stylesheet" href="gimp-help-custom.css" type="text/css" />
- <link rel="alternate stylesheet" href="gimp22.css" type="text/css" title="gimp22" />
- <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
- <link rel="start" href="index.html" title="GNU Image Manipulation Program" />
- <link rel="up" href="filters-enhance.html" title="5.  Enhance Filters" />
- <link rel="prev" href="plug-in-despeckle.html" title="5.3.  Despeckle" />
- <link rel="next" href="plug-in-red-eye-removal.html" title="5.5.  Red Eye Removal" />
- </head>
- <body>
- <div class="navheader">
- <table width="100%" summary="Navigation header">
- <tr>
- <th colspan="3" align="center">5.4. 
- <span lang="en" xml:lang="en">NL Filter</span>
- </th>
- </tr>
- <tr>
- <td width="20%" align="left"><a accesskey="p" href="plug-in-despeckle.html"><img src="../images/prev.png" alt="Prev" /></a> </td>
- <th width="60%" align="center">5. 
- <span lang="en" xml:lang="en">Enhance Filters</span>
- </th>
- <td width="20%" align="right"> <a accesskey="n" href="plug-in-red-eye-removal.html"><img src="../images/next.png" alt="Next" /></a></td>
- </tr>
- </table>
- <hr />
- </div>
- <div class="sect2" lang="en" xml:lang="en">
- <div class="titlepage">
- <div>
- <div>
- <h3 class="title"><a id="plug-in-nlfilt"></a>5.4. 
- <span lang="en" xml:lang="en">NL Filter</span>
- </h3>
- </div>
- <div>
- <div class="revhistory">
- <table border="1" width="100%" summary="Revision history">
- <tr>
- <th align="left" valign="top" colspan="3">
- <b>Revision History</b>
- </th>
- </tr>
- <tr>
- <td align="left">Revision $Revision: 2442 $</td>
- <td align="left">2006-11-26</td>
- <td align="left">j.h</td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- </div>
- <a id="id2737802" class="indexterm"></a>
- <a id="id2737820" class="indexterm"></a>
- <div class="sect3" lang="en" xml:lang="en">
- <div class="titlepage">
- <div>
- <div>
- <h4 class="title"><a id="id2737829"></a>5.4.1. 
- <span lang="en" xml:lang="en">Overview</span>
- </h4>
- </div>
- </div>
- </div>
- <p>
- You can find this filter through
- <span class="guimenu">Filters</span> ‚Üí <span class="guisubmenu">Enhance</span> ‚Üí <span class="guimenuitem"><span class="accel">N</span>L Filter</span>.
- NL means "Non Linear". Derived
- from the Unix <span class="command"><strong>pnmnlfilt</strong></span> program, it joins
- smoothing, despeckle and sharpen enhancement functions. It works
- on the whole image, not on the selection.
- </p>
- <p>
- This is something of a swiss army knife filter. It has 3 distinct
- operating modes. In all of the modes each pixel in the image is examined
- and processed according to it and its surrounding pixels values. Rather
- than using 9 pixels in a 3x3 block, it uses an hexagonal block whose
- size can be set with the Radius option.
- </p>
- </div>
- <div class="sect3" lang="en" xml:lang="en">
- <div class="titlepage">
- <div>
- <div>
- <h4 class="title"><a id="id2737892"></a>5.4.2. 
- <span lang="en" xml:lang="en">Options</span>
- </h4>
- </div>
- </div>
- </div>
- <div class="figure">
- <a id="id2737903"></a>
- <p class="title">
- <b>Figure 16.46. 
- <span lang="en" xml:lang="en">
- “<span class="quote">NL Filter</span>” options
- </span>
- </b>
- </p>
- <div class="figure-contents">
- <div class="mediaobject">
- <img src="../images/filters/filters-enhance-nlfilter.png" alt="NL Filter options" />
- </div>
- </div>
- </div>
- <br class="figure-break" />
- <div class="variablelist">
- <dl>
- <dt>
- <span class="term">Preview</span>
- </dt>
- <dd>
- <p>
- When <span class="guilabel">Do preview</span> is checked, parameter
- setting results are interactively displayed in preview.
- </p>
- </dd>
- <dt>
- <span class="term">Parameter settings</span>
- </dt>
- <dd>
- <p>
- </p>
- <div class="itemizedlist">
- <ul type="disc">
- <li>
- <p>
- <span class="guilabel">Alpha</span>: Meaning of this value
- depends on the selected option.
- </p>
- </li>
- <li>
- <p>
- <span class="guilabel">Radius</span>:
- Controls the strength of the filter (0.33-1.00).
- </p>
- </li>
- </ul>
- </div>
- <p>
- </p>
- </dd>
- </dl>
- </div>
- </div>
- <div class="sect3" lang="en" xml:lang="en">
- <div class="titlepage">
- <div>
- <div>
- <h4 class="title"><a id="id2738015"></a>5.4.3. 
- <span lang="en" xml:lang="en">Operating Modes</span>
- </h4>
- </div>
- </div>
- </div>
- <p>
- This filter can perform several distinct functions, depending on
- the value of the parameter <span class="guilabel">alpha</span>.
- </p>
- <div class="variablelist">
- <dl>
- <dt>
- <span class="term">
- Alpha trimmed mean filter. (0.0 <=
- <em class="parameter"><code>alpha</code></em> <= 0.5)
- </span>
- </dt>
- <dd>
- <p>
- The value of the center pixel will be replaced by the mean of
- the 7 hexagon values, but the 7 values are sorted by size and
- the top and bottom <em class="parameter"><code>alpha</code></em> portion of the 7
- are excluded from the mean. This implies that an
- <em class="parameter"><code>alpha</code></em> value of 0.0 gives the same sort of
- output as a normal convolution (ie. averaging or smoothing
- filter), where <em class="parameter"><code>radius</code></em> will determine the
- "strength" of the filter. A good value to start from for subtle
- filtering is <em class="parameter"><code>alpha</code></em> = 0.0,
- <em class="parameter"><code>radius</code></em> = 0.55. For a more blatant
- effect, try <em class="parameter"><code>alpha</code></em> 0.0 and
- <em class="parameter"><code>radius</code></em> 1.0.
- </p>
- <p>
- An <em class="parameter"><code>alpha</code></em> value of 0.5 will cause the
- median value of the 7 hexagons to be used to replace the center
- pixel value. This sort of filter is good for eliminating "pop"
- or single pixel noise from an image without spreading the noise
- out or smudging features on the image. Judicious use of the
- <em class="parameter"><code>radius</code></em> parameter will fine tune the
- filtering. Intermediate values of <em class="parameter"><code>alpha</code></em>
- give effects somewhere between smoothing and "pop" noise
- reduction. For subtle filtering try starting with values of
- <em class="parameter"><code>alpha</code></em> = 0.4,
- <em class="parameter"><code>radius</code></em> = 0.6. For a more blatant effect
- try <em class="parameter"><code>alpha</code></em> = 0.5,
- <em class="parameter"><code>radius</code></em> = 1.0 .
- </p>
- </dd>
- <dt>
- <span class="term">
- Optimal estimation smoothing. (1.0 <=
- <em class="parameter"><code>alpha</code></em> <= 2.0)
- </span>
- </dt>
- <dd>
- <p>
- This type of filter applies a smoothing filter adaptively over
- the image. For each pixel the variance of the surrounding
- hexagon values is calculated, and the amount of smoothing is
- made inversely proportional to it. The idea is that if the
- variance is small then it is due to noise in the image, while if
- the variance is large, it is because of "wanted" image features.
- As usual the <em class="parameter"><code>radius</code></em> parameter controls
- the effective radius, but it probably advisable to leave the
- radius between 0.8 and 1.0 for the variance calculation to be
- meaningful. The <em class="parameter"><code>alpha</code></em> parameter sets the
- noise threshold, over which less smoothing will be done. This
- means that small values of <em class="parameter"><code>alpha</code></em> will
- give the most subtle filtering effect, while large values will
- tend to smooth all parts of the image. You could start with
- values like
- <code class="code"><em class="parameter"><code>alpha</code></em> = 1.2</code>,
- <code class="code"><em class="parameter"><code>radius</code></em> = 1.0</code>,
- and try increasing or decreasing the
- <em class="parameter"><code>alpha</code></em> parameter to get the desired
- effect. This type of filter is best for filtering out dithering
- noise in both bitmap and color images.
- </p>
- </dd>
- <dt>
- <span class="term">
- Edge enhancement. (-0.1 >= <em class="parameter"><code>alpha</code></em> >= -0.9)
- </span>
- </dt>
- <dd>
- <p>
- This is the opposite type of filter to the smoothing filter. It
- enhances edges. The <em class="parameter"><code>alpha</code></em> parameter
- controls the amount of edge enhancement, from subtle (-0.1) to
- blatant (-0.9). The <em class="parameter"><code>radius</code></em> parameter
- controls the effective radius as usual, but useful values are
- between 0.5 and 0.9. Try starting with values of
- <code class="code">
- <em class="parameter"><code>alpha</code></em> = 0.3
- </code>,
- <code class="code">
- <em class="parameter"><code>radius</code></em> = 0.8
- </code>.
- </p>
- </dd>
- <dt>
- <span class="term">Combination use</span>
- </dt>
- <dd>
- <p>
- The various operating modes can be used one after the other to
- get the desired result. For instance to turn a monochrome
- dithered image into grayscale image you could try one or two
- passes of the smoothing filter, followed by a pass of the
- optimal estimation filter, then some subtle edge enhancement.
- Note that using edge enhancement is only likely to be useful
- after one of the non-linear filters (alpha trimmed mean or
- optimal estimation filter), as edge enhancement is the direct
- opposite of smoothing.
- </p>
- <p>
- For reducing color quantization noise in images (ie. turning
- .gif files back into 24 bit files) you could try a pass of the
- optimal estimation filter (<em class="parameter"><code>alpha</code></em> 1.2,
- <em class="parameter"><code>radius</code></em> 1.0), a pass of the median filter
- (<em class="parameter"><code>alpha</code></em> 0.5, <em class="parameter"><code>radius</code></em>
- 0.55), and possibly a pass of the edge enhancement filter.
- Several passes of the optimal estimation filter with declining
- <em class="parameter"><code>alpha</code></em> values are more effective than a
- single pass with a large <em class="parameter"><code>alpha</code></em> value. As
- usual, there is a trade-off between filtering effectiveness and
- losing detail. Experimentation is encouraged.
- </p>
- </dd>
- </dl>
- </div>
- </div>
- </div>
- <div class="navfooter">
- <hr />
- <table width="100%" summary="Navigation footer">
- <tr>
- <td width="40%" align="left"><a accesskey="p" href="plug-in-despeckle.html"><img src="../images/prev.png" alt="Prev" /></a> </td>
- <td width="20%" align="center">
- <a accesskey="u" href="filters-enhance.html">
- <img src="../images/up.png" alt="Up" />
- </a>
- </td>
- <td width="40%" align="right"> <a accesskey="n" href="plug-in-red-eye-removal.html"><img src="../images/next.png" alt="Next" /></a></td>
- </tr>
- <tr>
- <td width="40%" align="left" valign="top"><a accesskey="p" href="plug-in-despeckle.html">5.3. 
- <span lang="en" xml:lang="en">Despeckle</span>
- </a> </td>
- <td width="20%" align="center">
- <a accesskey="h" href="index.html">
- <img src="../images/home.png" alt="Home" />
- </a>
- </td>
- <td width="40%" align="right" valign="top"> <a accesskey="n" href="plug-in-red-eye-removal.html">5.5. 
- <span lang="en" xml:lang="en">Red Eye Removal</span>
- </a></td>
- </tr>
- </table>
- </div>
- </body>
- </html>
-