"Fossies" - the Fresh Open Source Software Archive

Member "sip-0.12.1/help/en_US/skel.xml" (22 Feb 2012, 7566 Bytes) of package /linux/privat/sip-0.12.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) XML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "skel.xml": 0.5.6_vs_0.12.1.

    1 <?xml version="1.0" encoding="ISO-8859-1"?><refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" version="5.0-subset Scilab" xml:lang="en" xml:id="skel"><info><pubdate>February 2004</pubdate></info><refnamediv><refname>skel</refname><refpurpose>skeletonization, thinning, Medial Axis Transform</refpurpose></refnamediv>
    2    <refsynopsisdiv><title>Calling Sequence</title><synopsis>[skl,dt,lbl] = skel(img [,side, algorithm])</synopsis></refsynopsisdiv>
    3    <refsection><title>Parameters</title>
    4       <variablelist>
    5          <varlistentry>
    6             <term>img</term>
    7             <listitem>
    8     Binary image containing one or more binary shapes. (foreground == 1,
    9     background == 0), One-pixel-wide regions are ignored (temporary limitation).
   10    </listitem>
   11          </varlistentry>
   12          <varlistentry>
   13             <term>side</term>
   14             <listitem>
   15                <variablelist>
   16                   <varlistentry>
   17                      <term>'interior'</term>
   18                      <listitem>
   19           if only internal skeleton is desired (DEFAULT)
   20          </listitem>
   21                   </varlistentry>
   22                   <varlistentry>
   23                      <term>'exterior'</term>
   24                      <listitem>
   25              if only external skeleton is desired
   26          </listitem>
   27                   </varlistentry>
   28                   <varlistentry>
   29                      <term>'both'</term>
   30                      <listitem>
   31         if the background and foreground skeleton must be computed
   32         at the same time
   33          </listitem>
   34                   </varlistentry>
   35                </variablelist>
   36             </listitem>
   37          </varlistentry>
   38          <varlistentry>
   39             <term>algorithm</term>
   40             <listitem>
   41                <variablelist>
   42                   <varlistentry>
   43                      <term>'fast euclidean'</term>
   44                      <listitem>
   45           (DEFAULT) will perform a fast O(n) algorithm using the
   46           Euclidean metric. For large and thick shapes, there may be
   47           a few small errors, which are dispensible for most practical
   48           applications.
   49          </listitem>
   50                   </varlistentry>
   51                   <varlistentry>
   52                      <term>'exact euclidean'</term>
   53                      <listitem>
   54             will perform an exact euclidean algorithm that is very
   55             much slower.
   56          </listitem>
   57                   </varlistentry>
   58                </variablelist>
   59             </listitem>
   60          </varlistentry>
   61       </variablelist>
   62    </refsection>
   63    <refsection><title>Parameters</title>
   64       <variablelist>
   65          <varlistentry>
   66             <term>skl</term>
   67             <listitem>
   68     The multiscale skeleton image. This is a grayscale image, which may be thresholded to yield a skeleton with varying levels of detail. The greater the threshold, the cleaner is the skeleton. A threshold level of 5 will give a usual skeleton similar to the one obtained by popular thinning methods.
   69    </listitem>
   70          </varlistentry>
   71          <varlistentry>
   72             <term>dt</term>
   73             <listitem>
   74     The euclidean distance transform of the image. It has the squared euclidean distances of any point of the image to the object.
   75    </listitem>
   76          </varlistentry>
   77          <varlistentry>
   78             <term>lbl</term>
   79             <listitem>
   80     Label image. This is the discrete Voronoi Diagram of the boundary pixels of the considered object. Is is a grayscale image indicating the region of influence of each boundary pixel.
   81    </listitem>
   82          </varlistentry>
   83       </variablelist>
   84    </refsection>
   85    <refsection><title>Description</title>
   86       <para>
   87  Function skel performs skeletonization (thinning) of a  binary object. The resulting medial axis is multi-scale,  meaning that it can be progressively pruned to eliminate  detail. This pruning is done by thresholding the output  skeleton image. </para>
   88       <para>
   89  The algorithm computes skeletons that are guaranteed to be  connected over all scales of simplification. The skeletons  are computed using the Euclidean metric. This has the  advantage to produce high-quality, isotropic and well-centered skeletons in the shape. However the exact algorithm  is computationally intensive. </para>
   90       <para>
   91  The radius of the maximal balls associated with the skeleton points are stored in the distance transform output  image. </para>
   92    </refsection>
   93    <refsection><title>Examples</title><programlisting role="example"><![CDATA[
   94     initial_dir = PWD;
   95     chdir (SIPDIR + 'images');
   96     xset('auto clear', 'on');
   97     im=gray_imread('escher.png');
   98     imshow(im,2);
   99     [skl,dt,vor] = skel(im);
  100     // Fine detail
  101     sklt = (skl &gt;= 5);
  102     imshow(im+sklt,[]);
  103     // Less detail
  104     sklt = (skl &gt;= 20);
  105     imshow(im+sklt,[]);
  106     // The Distance Transform
  107     imshow(sqrt(dt),[]);
  108     // The Influence zones or Voronoi diagram of the boundary pixels
  109     imshow(vor+1,rand(max(vor)+1,3));   // each region maps to a random color
  110     // Let's see if computation is really fast
  111     stacksize('max');
  112     big = mogrify(im,['-sample','1000x']);
  113     size(big)
  114     skl = skel(big);
  115     imshow(big + (skl &gt;= 50),[]);
  116     xset('auto clear', 'off');
  117     chdir(initial_dir);
  118 ]]></programlisting>
  119 
  120     <para><emphasis role="bold">The result of the preceding example, less detail (left) and more detail (right):</emphasis></para>
  121     <para><imagedata fileref="../images/skeleton-escher-less-detail.png" /> <imagedata fileref="../images/skeleton-escher-more-detail.png" />
  122     </para>
  123     <para><emphasis role="bold">The Influence or Voronoi regions of each boundary pixel (a.k.a. a label map), and the distance map:</emphasis></para>
  124     <para><imagedata fileref="../images/skeleton-escher-voronoi-regions.png" /> <imagedata fileref="../images/skeleton-escher-dt.png" /></para>
  125 </refsection>
  126 
  127    <refsection><title>Bibliography</title>
  128       <para>
  129    For the fast Euclidean algorithm:
  130    "Multiscale Skeletons by Image Foresting Transform
  131    and its Application to Neuromorphometry", 
  132    A.X. Falcao, L. da F. Costa, B.S. da Cunha,
  133    Pattern Recognition, 2002. 
  134    </para>
  135       <para>
  136    For the exact Euclidean algorithm:
  137    </para>
  138       <para>
  139    "Multiresolution shape representation without border shifting",
  140    L. da F. Costa, L. F. Estrozi, Electronics Letters, no. 21, vol. 35, 
  141    pp. 1829-1830, 1999.
  142    </para>
  143       <para>
  144 "Shape Analysis and Classification", 
  145 L. da F. Costa and R.M. Cesar Jr., CRC Press. 
  146    </para>
  147    </refsection>
  148    <refsection><title>Known Bugs</title>
  149    This function may not work for some kinds of input that is 
  150    already thin in some parts; it is a good idea to apply
  151    morphological dilation and closing before applying <literal>skel</literal>.
  152 </refsection>
  153    <refsection><title>Authors</title><simplelist type="vert">
  154       <member> Ricardo Fabbri &lt;ricardofabbri (AT) users DOT sf DOT net&gt; </member>
  155    </simplelist></refsection>
  156    <refsection><title>Availability</title>
  157 The latest version of the Scilab Image Processing toolbox can be found at
  158 <para>
  159          http://siptoolbox.sourceforge.net
  160       </para>
  161    </refsection>
  162    <refsection><title>See Also</title><simplelist type="inline">
  163       <member> 
  164          <link linkend="thin">thin</link> 
  165       </member>
  166       <member>reconstruction (not done yet...)</member>
  167    </simplelist></refsection>
  168 </refentry>