"Fossies" - the Fresh Open Source Software Archive

Member "sip-0.12.1/help/en_US/tangent.xml" (4 Mar 2012, 3718 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.

    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="tangent">
    3 <info>
    4   <pubdate>March, 2012</pubdate>
    5 </info>
    6 <refnamediv>
    7   <refname>tangent</refname>
    8   <refpurpose>compute tangents of a sampled curve</refpurpose>
    9 </refnamediv>
   10 
   11 <refsynopsisdiv>
   12   <title>Calling Sequence</title>
   13       <synopsis> K = tangent(BW [,sigma, delta])</synopsis>
   14       <synopsis> K = tangent(x,y [,sigma, delta])</synopsis>
   15 </refsynopsisdiv>
   16 
   17 <refsection>
   18 <title>Parameters</title>
   19 <variablelist>
   20 
   21    <varlistentry>
   22      <term>tgt</term>
   23      <listitem>
   24        nx2 vector whose i-th line is the unit tangent vector at the i-th sample
   25        of the contour.
   26      </listitem>
   27    </varlistentry>
   28 
   29    <varlistentry>
   30      <term>BW</term>
   31      <listitem>
   32        Binary image containing only one object (0 for background, 1 for object).
   33      </listitem>
   34    </varlistentry>
   35 
   36    <varlistentry>
   37      <term>x</term>
   38      <term>y</term>
   39      <listitem>
   40       vectors, storing the parametrized contour.
   41      </listitem>
   42    </varlistentry>
   43 
   44    <varlistentry>
   45      <term>sigma</term>
   46      <listitem>
   47        standard deviation of the gaussian function used to smooth the contour before computing the tangents. Defaults to 5.
   48      </listitem>
   49    </varlistentry>
   50 
   51    <varlistentry>
   52    <term>delta</term>
   53    <listitem>
   54     a double number, the time between samples (delta t), and defaults to 1.
   55    </listitem>
   56    </varlistentry>
   57 </variablelist>
   58 </refsection>
   59 
   60 <refsection>
   61 <title>Description</title>
   62    <para>
   63  Function <literal>tangent</literal> calculates the tangent direction as a
   64  vector at each point of a binary or sampled contour, using FFT and a formula from
   65  differential geometry. </para>
   66 
   67 </refsection>
   68 <refsection>
   69 <title>Examples</title>
   70    <programlisting><![CDATA[
   71        initial_dir = PWD;
   72        chdir (SIPDIR + 'images');
   73 
   74        a=gray_imread('r.gif');
   75        a=im2bw(a, 0.5);
   76        [x,y]=follow(a);
   77 
   78        npts = size(x,'*');
   79        tgt=tangent(x,y, 1);
   80 
   81        // Show the results
   82        fig;
   83        clf;
   84        plot(x,y);
   85        set(gca(), "isoview","on");
   86        set(gca(), "auto_clear","off");
   87        
   88        // todo use buffering
   89        for i=1:size(x,'*')
   90          champ(x(i),y(i),tgt(i,1),tgt(i,2),0.5);
   91        end
   92 
   93        chdir(initial_dir);
   94    ]]></programlisting>
   95 </refsection>
   96 
   97 <refsection>
   98 <title>References</title>
   99 <para>
  100 "Shape Analysis and Classification", L. da
  101 F. Costa and R. M. Cesar Jr., CRC Press. 
  102 </para>
  103 <para>
  104 "Differential  Geometry  of Curves and Surfaces", Manfredo
  105 P. do Carmo, Prentice Hall, 1976.
  106 </para>
  107 </refsection>
  108 
  109 <refsection><title>Authors</title><simplelist type="vert">
  110   <member>Ricardo Fabbri &lt;ricardofabbri[at]users.sf.net&gt;</member>
  111 </simplelist></refsection>
  112 
  113 <refsection><title>Availability</title>
  114 The latest version of SIP can be found at
  115 <para>http://siptoolbox.sf.net </para>
  116 </refsection>
  117 
  118 <refsection><title>See Also</title><simplelist type="inline">
  119       <member> <link linkend="curvature">curvature</link> </member>
  120       <member> <link linkend="follow">follow</link> </member>
  121       <member> <link linkend="gsm">gsm</link> </member>
  122       <member> <link linkend="fftderiv">fftderiv</link> </member>
  123 </simplelist>
  124 </refsection>
  125 
  126 </refentry>
  127 <!-- =================================================== 
  128            SIP - Scilab Image Processing toolbox
  129            Copyright (C) 2002-2009  Ricardo Fabbri
  130 
  131        See the file COPYING for license-related issues
  132      =================================================== -->