Sophie

Sophie

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

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

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
    <title>mmopen</title>
    <link href="../tbxdok.css" rel="stylesheet">
  </head>
  <body>
    <table class="topNav">
      <tr>
        <td class="index">
                  [<a href="../morph/mmclose.html"><tt>mmclose</tt></a>]
              
                  [<a href="index.html">Up</a>]
                  
                  [<a href="../morph/mmdist.html"><tt>mmdist</tt></a>]
              </td>
        <td class="title">Morphological Filters</td>
      </tr>
    </table>
    <h1>mmopen
      <br>
      <span class="subtitle">Morphological opening.
</span>
    </h1>
    <div class="synopsis">
      <H2>Synopsis</H2>
      <div class="H2">
        <div class="prototype">y = 
          <span class="fun">mmopen</span>(
                  
          <span class="par">f</span>, 
          <span class="par">b</span> = None
                  )
        </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>          Gray-scale (uint8 or uint16) or 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><p>Default: 
                      <code>None</code> (3x3 elementary cross)
                    </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></td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
    <div class="descr">
      <H2>Description</H2>
      <div class="H2">
        <p>
          <span class="fun">mmopen</span> creates the image 
          <code>y</code> by the morphological opening of the image 
          <code>f</code> by the structuring element 
          <code>b</code>. In the binary case, the opening by the structuring element 
          <code>B</code>  may be interpreted as the union of translations of 
          <code>B</code> included in 
          <code>f</code>. In the gray-scale case, there is a similar interpretation taking the functions umbra.
                  
        </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; f=mmbinary(mmreadgray('blob.tif'))</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; bimg=mmbinary(mmreadgray('blob1.tif'))</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; b=mmimg2se(bimg)</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; mmshow(f)</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; mmshow(mmopen(f,b))</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; mmshow(mmopen(f,b),mmgradm(f))
        </pre>
              <pre class="computer"></pre>
            </div>
            <table class="images">
              <tbody align="center">
                <tr class="image" valign="bottom">
                  <td><img width="239" src="../images/img_mmopen_001.jpg"></td>
                  <td><img width="239" src="../images/img_mmopen_002.jpg"></td>
                  <td class="spare"></td>
                </tr>
                <tr class="title" valign="baseline">
                  <td><a href="../images/img_mmopen_001.jpg">f</a></td>
                  <td><a href="../images/img_mmopen_002.jpg">mmopen(f,b)</a></td>
                  <td class="spare"></td>
                </tr>
              </tbody>
            </table>
            <table class="images">
              <tbody align="center">
                <tr class="image" valign="bottom">
                  <td><img width="239" src="../images/img_mmopen_003.jpg"></td>
                  <td class="spare"></td>
                </tr>
                <tr class="title" valign="baseline">
                  <td><a href="../images/img_mmopen_003.jpg">mmopen(f,b),mmgradm(f)</a></td>
                  <td class="spare"></td>
                </tr>
              </tbody>
            </table>
          </div>
          <div class="example">
            <div class="listing">
              <pre class="user">&gt;&gt;&gt; a=mmbinary(mmreadgray('pcb1bin.tif'))</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; b=mmopen(a,mmsebox(2))</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; c=mmopen(a,mmsebox(4))</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; mmshow(a)</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; mmshow(b)</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; mmshow(c)
        </pre>
              <pre class="computer"></pre>
            </div>
            <table class="images">
              <tbody align="center">
                <tr class="image" valign="bottom">
                  <td><img width="258" src="../images/img_mmopen_004.jpg"></td>
                  <td><img width="258" src="../images/img_mmopen_005.jpg"></td>
                  <td class="spare"></td>
                </tr>
                <tr class="title" valign="baseline">
                  <td><a href="../images/img_mmopen_004.jpg">a</a></td>
                  <td><a href="../images/img_mmopen_005.jpg">b</a></td>
                  <td class="spare"></td>
                </tr>
              </tbody>
            </table>
            <table class="images">
              <tbody align="center">
                <tr class="image" valign="bottom">
                  <td><img width="258" src="../images/img_mmopen_006.jpg"></td>
                  <td class="spare"></td>
                </tr>
                <tr class="title" valign="baseline">
                  <td><a href="../images/img_mmopen_006.jpg">c</a></td>
                  <td class="spare"></td>
                </tr>
              </tbody>
            </table>
          </div>
          <div class="example">
            <div class="listing">
              <pre class="user">&gt;&gt;&gt; a=mmreadgray('astablet.tif')</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; b=mmopen(a,mmsedisk(18))</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; mmshow(a)</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; mmshow(b)
        </pre>
              <pre class="computer"></pre>
            </div>
            <table class="images">
              <tbody align="center">
                <tr class="image" valign="bottom">
                  <td><img width="251" src="../images/img_mmopen_007.jpg"></td>
                  <td><img width="251" src="../images/img_mmopen_008.jpg"></td>
                  <td class="spare"></td>
                </tr>
                <tr class="title" valign="baseline">
                  <td><a href="../images/img_mmopen_007.jpg">a</a></td>
                  <td><a href="../images/img_mmopen_008.jpg">b</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_mmopen001.png">
          </div>
        </p>
      </div>
    </div>
    <div class="sourcecode">
      <H2>Source Code</H2>
      <div class="H2">
        <pre class="listing">
def mmopen(f, b=None):
    if b is None: b = mmsecross()
    y = mmdil(mmero(f,b),b)
    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/mmclose.html">mmclose</a></td>
              <td class="def">Morphological closing.</td>
            </tr>
            <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/mmimg2se.html">mmimg2se</a></td>
              <td class="def">Create a structuring element from a pair of images.</td>
            </tr>
            <tr>
              <td class="term"><a href="../morph/mmsebox.html">mmsebox</a></td>
              <td class="def">Create a box structuring element.</td>
            </tr>
            <tr>
              <td class="term"><a href="../morph/mmsecross.html">mmsecross</a></td>
              <td class="def">Diamond structuring element and elementary 3x3 cross.</td>
            </tr>
            <tr>
              <td class="term"><a href="../morph/mmareaopen.html">mmareaopen</a></td>
              <td class="def">Area opening</td>
            </tr>
            <tr>
              <td class="term"><a href="../morph/mmsesum.html">mmsesum</a></td>
              <td class="def">N-1 iterative Minkowski  additions</td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
    <center>
      <table class="botNav">
        <tr>
          <td class="index">
                    [<a href="../morph/mmclose.html"><tt>mmclose</tt></a>]
                
                    [<a href="index.html">Up</a>]
                    
                    [<a href="../morph/mmdist.html"><tt>mmdist</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>