[pktools] 03/07: Add man page for pkfilter.

Bas Couwenberg sebastic at xs4all.nl
Sun Dec 7 01:42:20 UTC 2014


This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch master
in repository pktools.

commit ce0eb99df9b57305f0db085e47708c174d1f587a
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Sun Dec 7 00:19:22 2014 +0100

    Add man page for pkfilter.
---
 debian/changelog          |   2 +-
 debian/man/pkfilter.1.xml | 479 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 480 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 42ee1f5..28a54f4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,7 +5,7 @@ pktools (2.6.1-1) UNRELEASED; urgency=medium
   * Remove libbase package, library no longer installed.
   * Add man page for pkann, pkascii2img, pkascii2ogr, pkcomposite, pkcreatect,
     pkcrop, pkdiff, pkdsm2shadow, pkdumpimg, pkdumpogr, pkegcs, pkextract,
-    pkfillnodata, pkfilterascii.
+    pkfillnodata, pkfilter, pkfilterascii.
 
  -- Bas Couwenberg <sebastic at xs4all.nl>  Wed, 03 Dec 2014 21:16:31 +0100
 
diff --git a/debian/man/pkfilter.1.xml b/debian/man/pkfilter.1.xml
new file mode 100644
index 0000000..fcc8e39
--- /dev/null
+++ b/debian/man/pkfilter.1.xml
@@ -0,0 +1,479 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
+<refentry id='pkfilter'>
+
+  <refmeta>
+    <refentrytitle>pkfilter</refentrytitle>
+    <manvolnum>1</manvolnum>
+  </refmeta>
+
+  <refnamediv>
+    <refname>pkfilter</refname>
+    <refpurpose>program to filter raster images</refpurpose>
+  </refnamediv>
+
+  <refsynopsisdiv id='synopsis'>
+    <cmdsynopsis>
+      <command>pkfilter</command>
+      <arg choice='plain'><option>-i</option> <replaceable>input</replaceable></arg>
+      <arg choice='plain'><option>-o</option> <replaceable>output</replaceable></arg>
+      <arg choice='opt'><replaceable>options</replaceable></arg>
+      <arg choice='opt'><replaceable>advanced options</replaceable></arg>
+    </cmdsynopsis>
+  </refsynopsisdiv>
+
+  <refsect1 id='description'>
+    <title>DESCRIPTION</title>
+    <para>
+      <command>pkfilter</command> implements spatial and spectral filtering for
+      raster data.
+      In the spatial domain (X, Y), the filter typically involves a rectangular
+      convolution kernel (moving window).
+      To avoid image shifting, the size of the window should be odd
+      (3, 5, 7, ...).
+      You can set the window sizes in X and Y directions separately with the
+      options <option>-dx</option> and <option>-dy</option>.
+      A circular kernel (disc) is applied if option <option>-c</option> is set.
+      An overview of the supported filters (option
+      <option>-f</option>|<option>--filter</option>) is given below.
+      You can create customized filters by defining your own filter taps
+      (multiplicative elements of the filter kernel) via an ascii file (option
+      <option>-tap</option>).
+      In the spectral/temporal domain (Z) you can filter multi-band raster
+      inputs.
+      The kernel filter size can be set with the option <option>-dz</option>
+      (use odd values only).
+    </para>
+  </refsect1>
+
+  <refsect1 id='options'>
+    <title>OPTIONS</title>
+    <variablelist>
+
+      <varlistentry>
+        <term><option>-i</option> <replaceable>filename</replaceable></term>
+        <term><option>--input</option> <replaceable>filename</replaceable></term>
+        <listitem>
+          <para>
+            input image
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-o</option> <replaceable>filename</replaceable></term>
+        <term><option>--output</option> <replaceable>filename</replaceable></term>
+        <listitem>
+          <para>
+            output classification image
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-f</option> <replaceable>filter</replaceable></term>
+        <term><option>--filter</option> <replaceable>filter</replaceable></term>
+        <listitem>
+          <para>
+            filter function (median, var, min, max, sum, mean, dilate, erode,
+            close, open, homog (central pixel must be identical to all other
+            pixels within window), heterog, sobelx (horizontal edge detection),
+            sobely (vertical edge detection), sobelxy (diagonal edge detection
+            NE-SW), sobelyx (diagonal edge detection NW-SE), smooth, density,
+            countid, mode (majority voting, only for classes), smoothnodata
+            (smooth nodata values only) values, threshold local filtering,
+            ismin, ismax, heterogeneous (central pixel must be different than
+            all other pixels within window), order (rank pixels in order),
+            stdev, mrf, dwt, dwti, dwt_cut, dwt_cut_from, scramble, shift,
+            linearfeature) 
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-v</option> <replaceable>level</replaceable></term>
+        <term><option>--verbose</option> <replaceable>level</replaceable></term>
+        <listitem>
+          <para>
+            verbose mode if > 0
+          </para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+    
+    <para>Advanced options</para>
+    <variablelist>
+
+      <varlistentry>
+        <term><option>-circ</option></term>
+        <term><option>--circular</option></term>
+        <listitem>
+          <para>
+            circular disc kernel for dilation and erosion
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-r</option> <replaceable>method</replaceable></term>
+        <term><option>--resampling-method</option> <replaceable>method</replaceable></term>
+        <listitem>
+          <para>
+            Resampling method for shifting operation (near: nearest neighbour,
+            bilinear: bi-linear interpolation).
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-dx</option> <replaceable>value</replaceable></term>
+        <term><option>--dx</option> <replaceable>value</replaceable></term>
+        <listitem>
+          <para>
+            filter kernel size in x,
+            better use odd value to avoid image shift
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-dy</option> <replaceable>value</replaceable></term>
+        <term><option>--dy</option> <replaceable>value</replaceable></term>
+        <listitem>
+          <para>
+            filter kernel size in y,
+            better use odd value to avoid image shift
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-dz</option> <replaceable>value</replaceable></term>
+        <term><option>--dz</option> <replaceable>value</replaceable></term>
+        <listitem>
+          <para>
+            filter kernel size in z (band or spectral dimension),
+            must be odd (example: 3).
+            Set dz>0 if 1-D filter must be used in band domain
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-co</option> <replaceable>option</replaceable></term>
+        <term><option>--co</option> <replaceable>option</replaceable></term>
+        <listitem>
+          <para>
+            Creation option for output file.
+            Multiple options can be specified.
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-wt</option> <replaceable>type</replaceable></term>
+        <term><option>--wavelet</option> <replaceable>type</replaceable></term>
+        <listitem>
+          <para>
+            wavelet type: daubechies,daubechies_centered, haar, haar_centered,
+            bspline, bspline_centered
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-wf</option> <replaceable>family</replaceable></term>
+        <term><option>--wf</option> <replaceable>family</replaceable></term>
+        <listitem>
+          <para>
+            wavelet family (vanishing moment, see also
+            http://www.gnu.org/software/gsl/manual/html_node/DWT-Initialization.html)
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-class</option> <replaceable>value</replaceable></term>
+        <term><option>--class</option> <replaceable>value</replaceable></term>
+        <listitem>
+          <para>
+            class value(s) to use for density, erosion, dilation,
+            openening and closing, thresholding
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-t</option> <replaceable>threshold</replaceable></term>
+        <term><option>--threshold</option> <replaceable>threshold</replaceable></term>
+        <listitem>
+          <para>
+            threshold value(s) to use for threshold filter (one for each class),
+            or threshold to cut for dwt_cut (use 0 to keep all) or dwt_cut_from,
+            or sigma for shift 
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-nodata</option> <replaceable>value</replaceable></term>
+        <term><option>--nodata</option> <replaceable>value</replaceable></term>
+        <listitem>
+          <para>
+            nodata value(s) (used for smoothnodata filter) 
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-tap</option> <replaceable>filename</replaceable></term>
+        <term><option>--tap</option> <replaceable>filename</replaceable></term>
+        <listitem>
+          <para>
+            text file containing taps used for spatial filtering
+            (from ul to lr).
+            Use dimX and dimY to specify tap dimensions in x and y.
+            Leave empty for not using taps
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-tapz</option> <replaceable>value</replaceable></term>
+        <term><option>--tapz</option> <replaceable>value</replaceable></term>
+        <listitem>
+          <para>
+            taps used for spectral filtering
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-pad</option> <replaceable>method</replaceable></term>
+        <term><option>--pad</option> <replaceable>method</replaceable></term>
+        <listitem>
+          <para>
+            Padding method for filtering (how to handle edge effects).
+            Choose between: symmetric, replicate, circular, constant
+            (pad with 0).
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-fwhm</option> <replaceable>value</replaceable></term>
+        <term><option>--fwhm</option> <replaceable>value</replaceable></term>
+        <listitem>
+          <para>
+            list of full width half to apply spectral filtering
+            (<option>-fwhm</option> <replaceable>band1</replaceable>
+            <option>-fwhm</option> <replaceable>band2</replaceable> ...)
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-srf</option> <replaceable>filename</replaceable></term>
+        <term><option>--srf</option> <replaceable>filename</replaceable></term>
+        <listitem>
+          <para>
+            list of ASCII files containing spectral response functions
+            (two columns: wavelength response)
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-win</option> <replaceable>col</replaceable></term>
+        <term><option>--wavelengthIn</option> <replaceable>col</replaceable></term>
+        <listitem>
+          <para>
+            column number of input ASCII file containing wavelengths
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-wout</option> <replaceable>value</replaceable></term>
+        <term><option>--wavelengthOut</option> <replaceable>value</replaceable></term>
+        <listitem>
+          <para>
+            list of wavelengths in output spectrum
+            (<option>-wout</option> <replaceable>band1</replaceable>
+            <option>-wout</option> <replaceable>band2</replaceable> ...)
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-down</option> <replaceable>value</replaceable></term>
+        <term><option>--down</option> <replaceable>value</replaceable></term>
+        <listitem>
+          <para>
+            down sampling factor.
+            Use value 1 for no downsampling).
+            Use value n>1 for downsampling (aggregation)
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-beta</option> <replaceable>filename</replaceable></term>
+        <term><option>--beta</option> <replaceable>filename</replaceable></term>
+        <listitem>
+          <para>
+            ASCII file with beta for each class transition in
+            Markov Random Field
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-eps</option> <replaceable>value</replaceable></term>
+        <term><option>--eps</option> <replaceable>value</replaceable></term>
+        <listitem>
+          <para>
+            error marging for linear feature
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-l1</option></term>
+        <term><option>--l1</option></term>
+        <listitem>
+          <para>
+            obtain longest object length for linear feature
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-a1</option></term>
+        <term><option>--a1</option></term>
+        <listitem>
+          <para>
+            obtain angle found for longest object length for linear feature
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-a2</option></term>
+        <term><option>--a2</option></term>
+        <listitem>
+          <para>
+            obtain angle found for shortest object length for linear feature
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-interp</option> <replaceable>type</replaceable></term>
+        <term><option>--interp</option> <replaceable>type</replaceable></term>
+        <listitem>
+          <para>
+            type of interpolation for spectral filtering (see
+            http://www.gnu.org/software/gsl/manual/html_node/Interpolation-Types.html)
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-ot</option> <replaceable>type</replaceable></term>
+        <term><option>--otype</option> <replaceable>type</replaceable></term>
+        <listitem>
+          <para>
+            Data type for output image
+            ({Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/CInt16/CInt32/CFloat32/CFloat64}).
+            Empty string: inherit type from input image 
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-of</option> <replaceable>GDALformat</replaceable></term>
+        <term><option>--oformat</option> <replaceable>GDALformat</replaceable></term>
+        <listitem>
+          <para>
+            Output image format (see also
+            <citerefentry>
+              <refentrytitle>gdal_translate</refentrytitle>
+              <manvolnum>1</manvolnum>
+            </citerefentry>).
+            Empty string: inherit from input image 
+          </para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><option>-ct</option> <replaceable>filename</replaceable></term>
+        <term><option>--ct</option> <replaceable>filename</replaceable></term>
+        <listitem>
+          <para>
+            color table (file with 5 columns:
+            id R G B ALFA (0: transparent, 255: solid)).
+            Use none to ommit color table 
+          </para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </refsect1>
+
+  <refsect1 id='example'>
+    <title>EXAMPLE</title>
+
+    <example>
+      <title>Filtering in spatial domain</title>
+
+      <para>
+        Filter input.tif with morphological dilation filter.
+        Use a circular kernel (instead of rectangular) of size 3x3.
+      </para>
+      <screen>
+<command>pkfilter</command> <option>-i</option> <replaceable>input.tif</replaceable> <option>-o</option> <replaceable>filter.tif</replaceable> <option>-dx</option> <replaceable>3</replaceable> <option>-dy</option> <replaceable>3</replaceable> <option>-f</option> <replaceable>dilate</replaceable> <option>-c</option>
+      </screen>
+
+      <para>
+        Similar to previous example,
+        but consider only values of 255 for filtering operation.
+        Typical usage:
+        dilate cloud values in input image that are flagged as 255
+      </para>
+      <screen>
+<command>pkfilter</command> <option>-i</option> <replaceable>input.tif</replaceable> <option>-o</option> <replaceable>filter.tif</replaceable> <option>-dx</option> <replaceable>3</replaceable> <option>-dy</option> <replaceable>3</replaceable> <option>-class</option> <replaceable>255</replaceable> <option>-f</option> <replaceable>dilate</replaceable> <option>-c</option>
+      </screen>
+    </example>
+
+    <example>
+      <title>Filtering in spectral/temporal domain</title>
+
+      <para>
+        Calculate the median value for each pixel,
+        calculated on a moving window of width 3
+        (<option>-dz</option> <replaceable>3</replaceable>)
+        over all input bands.
+        The output raster dataset will contain as many bands as the input
+        raster dataset.
+      </para>
+      <screen>
+<command>pkfilter</command> <option>-i</option> <replaceable>input.tif</replaceable> <option>-o</option> <replaceable>filter_stdev.tif</replaceable> <option>-dz</option> <replaceable>3</replaceable> <option>-f</option> <replaceable>median</replaceable>
+      </screen>
+
+      <para>
+        No moving window (<option>-dz</option> <replaceable>1</replaceable>).
+        Calculate the standard deviation for each pixel,
+        calculated on all input bands.
+        The output raster dataset will contain a single band only.
+      </para>
+      <screen>
+<command>pkfilter</command> <option>-i</option> <replaceable>input.tif</replaceable> <option>-o</option> <replaceable>filter_stdev.tif</replaceable> <option>-dz</option> <replaceable>1</replaceable> <option>-f</option> <replaceable>stdev</replaceable>
+      </screen>
+    </example>
+
+  </refsect1>
+
+</refentry>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pktools.git



More information about the Pkg-grass-devel mailing list