Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 4a71d9984febeb5a206904a5a379841a > files > 663

python-morph-0.8-7mdv2010.0.noarch.rpm

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
    <title>mmcbisector</title>
    <link href="../tbxdok.css" rel="stylesheet">
  </head>
  <body>
    <table class="topNav">
      <tr>
        <td class="index">
                  [<a href="../morph/mmedgeoff.html"><tt>mmedgeoff</tt></a>]
              
                  [<a href="index.html">Up</a>]
                  
                  [<a href="../morph/mmcloserecth.html"><tt>mmcloserecth</tt></a>]
              </td>
        <td class="title">Residues</td>
      </tr>
    </table>
    <h1>mmcbisector
      <br>
      <span class="subtitle">N-Conditional bisector.
</span>
    </h1>
    <div class="synopsis">
      <H2>Synopsis</H2>
      <div class="H2">
        <div class="prototype">y = 
          <span class="fun">mmcbisector</span>(
                  
          <span class="par">f</span>, 
          <span class="par">B</span>, 
          <span class="par">n</span>
                  )
        </div>
        <p>Implemented in 
          <b>Python.</b>
        </p>
        <div class="input">
          <H3>Input</H3>
          <div class="H3">
            <table class="deflist">
              <tbody valign="baseline">
                <tr>
                  <td class="term"><span class="par">f</span></td>
                  <td class="def"><span class="type"><a href="../mmtypes/mmImage.html">Image</a></span>          Binary image.
                        </td>
                </tr>
                <tr>
                  <td class="term"><span class="par">B</span></td>
                  <td class="def"><span class="type"><a href="../mmtypes/mmSe.html">Structuring Element</a></span></td>
                </tr>
                <tr>
                  <td class="term"><span class="par">n</span></td>
                  <td class="def"><span class="type"><a href="../mmtypes/mmDouble.html">Double</a></span><p>positive integer ( filtering rate)</p></td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
        <div class="output">
          <H3>Output</H3>
          <div class="H3">
            <table class="deflist">
              <tbody valign="baseline">
                <tr>
                  <td class="term"><span class="par">y</span></td>
                  <td class="def"><span class="type"><a href="../mmtypes/mmImage.html">Image</a></span>          Binary image.
                        </td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
    <div class="descr">
      <H2>Description</H2>
      <div class="H2">
        <p>
          <span class="fun">mmcbisector</span> creates the binary image 
          <code>y</code> by performing a filtering of the morphological skeleton of the binary image 
          <code>f</code>, relative to the structuring element 
          <code>B</code>. The strength of this filtering is controlled by the parameter n. Particularly, if 
          <code>n=0</code>, 
          <code>y</code> is the morphological skeleton of 
          <code>f</code> itself.
                  
        </p>
      </div>
    </div>
    <div class="examples">
      <H2>Examples</H2>
      <div class="H2">
        <p>
          <div class="example">
            <div class="listing">
              <pre class="user">&gt;&gt;&gt; a=mmreadgray('blob2.tif')</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; b=mmcbisector(a,mmsebox(),1)</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; c=mmcbisector(a,mmsebox(),3)</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; d=mmcbisector(a,mmsebox(),10)</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; mmshow(a,b)</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; mmshow(a,c)</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; mmshow(a,d)</pre>
              <pre class="computer"></pre>
            </div>
            <table class="images">
              <tbody align="center">
                <tr class="image" valign="bottom">
                  <td><img width="260" src="../images/img_mmcbisector_001.jpg"></td>
                  <td><img width="260" src="../images/img_mmcbisector_002.jpg"></td>
                  <td class="spare"></td>
                </tr>
                <tr class="title" valign="baseline">
                  <td><a href="../images/img_mmcbisector_001.jpg">a,b</a></td>
                  <td><a href="../images/img_mmcbisector_002.jpg">a,c</a></td>
                  <td class="spare"></td>
                </tr>
              </tbody>
            </table>
            <table class="images">
              <tbody align="center">
                <tr class="image" valign="bottom">
                  <td><img width="260" src="../images/img_mmcbisector_003.jpg"></td>
                  <td class="spare"></td>
                </tr>
                <tr class="title" valign="baseline">
                  <td><a href="../images/img_mmcbisector_003.jpg">a,d</a></td>
                  <td class="spare"></td>
                </tr>
              </tbody>
            </table>
          </div>
        </p>
      </div>
    </div>
    <div class="equation">
      <H2>Equation</H2>
      <div class="H2">
        <p>
          <div class="eqfig">
            <img src="../images/eq_mmcbisector001.png">
          </div>
        </p>
      </div>
    </div>
    <div class="sourcecode">
      <H2>Source Code</H2>
      <div class="H2">
        <pre class="listing">
def mmcbisector(f, B, n):
    y = mmintersec(f,0)
    for i in range(n):
        nb = mmsesum(B,i)
        nbp = mmsesum(B,i+1)
        f1 = mmero(f,nbp)
        f2 = mmcdil(f1,f,B,n)
        f3 = mmsubm(mmero(f,nb),f2)
        y  = mmunion(y,f3)
    return y
    </pre>
      </div>
    </div>
    <div class="seealso">
      <H2>See also</H2>
      <div class="H2">
        <table class="deflist">
          <tbody valign="baseline">
            <tr>
              <td class="term"><a href="../morph/mmfreedom.html">mmfreedom</a></td>
              <td class="def">Control automatic data type conversion.</td>
            </tr>
            <tr>
              <td class="term"><a href="../morph/mmskelm.html">mmskelm</a></td>
              <td class="def">Morphological skeleton (Medial Axis Transform).</td>
            </tr>
            <tr>
              <td class="term"><a href="../morph/mmthin.html">mmthin</a></td>
              <td class="def">Image transformation by thinning.</td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
    <center>
      <table class="botNav">
        <tr>
          <td class="index">
                    [<a href="../morph/mmedgeoff.html"><tt>mmedgeoff</tt></a>]
                
                    [<a href="index.html">Up</a>]
                    
                    [<a href="../morph/mmcloserecth.html"><tt>mmcloserecth</tt></a>]
                </td>
          <td rowspan="2" class="xhtml"><a href="http://www.python.org"><img width="55" alt="Python" height="22" src="../PythonPoweredSmall.gif"></a></td>
        </tr>
        <tr>
          <td class="copyright">Copyright (c) 2003, Roberto A. Lotufo, UNICAMP-University of Campinas; Rubens C. Machado, CenPRA-Renato Archer Research Center.</td>
        </tr>
      </table>
    </center>
  </body>
</html>