"Fossies" - the Fresh Open Source Software Archive

Member "sip-0.12.1/help/en_US/curvature.xml" (18 Jun 2012, 4188 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 "curvature.xml": 0.5.6_vs_0.12.1.

    1 <?xml version="1.0" encoding="ISO-8859-1"?>
    2 <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="curvature">
    3 <info>
    4   <pubdate>February, 2004</pubdate>
    5 </info>
    6 <refnamediv>
    7   <refname>curvature</refname>
    8   <refpurpose>Curvature of a contour</refpurpose>
    9 </refnamediv>
   10 
   11 <refsynopsisdiv>
   12   <title>Calling Sequence</title>
   13       <synopsis> K = curvature(BW [,sigma, delta])</synopsis>
   14       <synopsis> K = curvature(x,y [,sigma, delta])</synopsis>
   15 </refsynopsisdiv>
   16 
   17 <refsection>
   18 <title>Parameters</title>
   19 <variablelist>
   20 
   21    <varlistentry>
   22      <term>K</term>
   23      <listitem>
   24        vector containing the curvature of the contour at each point.
   25      </listitem>
   26    </varlistentry>
   27 
   28    <varlistentry>
   29      <term>BW</term>
   30      <listitem>
   31        Binary image containing only one object (0 for background, 1 for object).
   32      </listitem>
   33    </varlistentry>
   34 
   35    <varlistentry>
   36      <term>x</term>
   37      <term>y</term>
   38      <listitem>
   39       vectors, storing the parametrized contour.
   40      </listitem>
   41    </varlistentry>
   42 
   43    <varlistentry>
   44      <term>sigma</term>
   45      <listitem>
   46        standard deviation of the gaussian function used to smooth the contour before computing the curvature. Defaults to 5.
   47      </listitem>
   48    </varlistentry>
   49 
   50    <varlistentry>
   51    <term>delta</term>
   52    <listitem>
   53     a double number, the time between samples (delta t), and defaults to 1.
   54    </listitem>
   55    </varlistentry>
   56 </variablelist>
   57 </refsection>
   58 
   59 <refsection>
   60 <title>Description</title>
   61    <para>
   62  Function <literal>curvature</literal> calculates the curvature at each point  of a binary contour, using FFT and a formula from differential geometry. </para>
   63 
   64 </refsection>
   65 <refsection>
   66 <title>Examples</title>
   67    <programlisting><![CDATA[
   68        initial_dir = PWD;
   69        chdir (SIPDIR + 'images');
   70 
   71        Img = imread('star.bmp');
   72        clf
   73        imshow(Img,2);
   74        k = curvature(Img,13);  // 13 sigma (shape is smoothed so curvature exists)
   75        clf
   76        plot(k)
   77        xlabel('curve sample id')
   78        ylabel('curvature')
   79        //
   80        // observe there are six curvature peaks,
   81        // corresponding to the six peaks of the star. There
   82        // is one peak half at 0 and half at about 450.
   83        // That's because the parametrization of
   84        // the contour started at the highest peak and
   85        // terminated there. Note also that the shape had to
   86        // be considerably smoothed so the curvature doesn't
   87        // blow up at the very sharp peaks of the star.
   88        //
   89 
   90        chdir(initial_dir);
   91    ]]></programlisting>
   92 </refsection>
   93 
   94 <para><emphasis role="bold">Original image and the curvature function of its (Gaussian-smoothed) boundary curve:</emphasis></para>
   95 <para><imagedata fileref="../../images/star.bmp" />  
   96 <imagedata fileref="../images/curvature-plot.png" />
   97 </para>
   98 
   99 
  100 <refsection>
  101 <title>References</title>
  102 <para>
  103 "Shape Analysis and Classification", L. da
  104 F. Costa and R. M. Cesar Jr., CRC Press. 
  105 </para>
  106 <para>
  107 "Differential  Geometry  of Curves and Surfaces", Manfredo
  108 P. do Carmo, Prentice Hall, 1976.
  109 </para>
  110 </refsection>
  111 
  112 <refsection><title>Authors</title><simplelist type="vert">
  113   <member>Ricardo Fabbri &lt;ricardofabbri[at]users.sf.net&gt;</member>
  114 </simplelist></refsection>
  115 
  116 <refsection><title>Availability</title>
  117 The latest version of SIP can be found at
  118 <para>http://siptoolbox.sf.net </para>
  119 </refsection>
  120 
  121 <refsection><title>See Also</title><simplelist type="inline">
  122       <member> <link linkend="tangent">tangent</link> </member>
  123       <member> <link linkend="follow">follow</link> </member>
  124       <member> <link linkend="gsm">gsm</link> </member>
  125       <member> <link linkend="fftderiv">fftderiv</link> </member>
  126 </simplelist>
  127 </refsection>
  128 
  129 </refentry>
  130 <!-- =================================================== 
  131            SIP - Scilab Image Processing toolbox
  132            Copyright (C) 2002-2009  Ricardo Fabbri
  133 
  134        See the file COPYING for license-related issues
  135      =================================================== -->