Sophie

Sophie

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

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

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
    <title>mmImage</title>
    <link href="../tbxdok.css" rel="stylesheet">
  </head>
  <body>
    <table class="topNav">
      <tr>
        <td class="index">
                  [<a href="index.html">Up</a>]
                  
                  [<a href="../mmtypes/mmSe.html"><tt>mmSe</tt></a>]
              </td>
        <td class="title">Data Types</td>
      </tr>
    </table>
    <h1>mmImage
      <br>
      <span class="subtitle">Toolbox image datatype
</span>
    </h1>
    <div class="descr">
      <H2>Description</H2>
      <div class="H2">
        <p>
                      The Morphology Toolbox mainly supports four types of images according to their pixel datatypes : binary, unsigned gray scale uint8 and uint16, and signed gray scale int32. Most functions work for 1D, 2D and 3D images. If an operation involves images of specific datatype, an automatic conversion can take place, controlled by the function 
          <span class="fun">mmfreedom</span>. To verify the datatype of an image, use the functions: 
          <span class="fun">mmdatatype</span> and 
          <span class="fun">mmlimits</span>.
                  
        </p>
      </div>
    </div>
    <div class="examples">
      <H2>Examples</H2>
      <div class="H2">
        <p>
                          In the examples below, all images has pixels with values zero and one, but only the first one is a binary image. This can be verified by calling the function mmlimits that outputs the minimum and maximum pixel values allowed in an image.

          <div class="example">
            <div class="listing">
              <pre class="user">&gt;&gt;&gt; f1 = mmbinary([[0,1,0,1],
                   [0,0,1,1]])</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; print mmlimits(f1)</pre>
              <pre class="computer">[0 1]</pre>
              <pre class="user">&gt;&gt;&gt; print mmdatatype(f1)</pre>
              <pre class="computer">binary</pre>
              <pre class="user">&gt;&gt;&gt; f2 = uint8([[0,1,0,1],
                [0,0,1,1]])</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; print mmlimits(f2)</pre>
              <pre class="computer">[  0 255]</pre>
              <pre class="user">&gt;&gt;&gt; print mmdatatype(f2)</pre>
              <pre class="computer">uint8</pre>
              <pre class="user">&gt;&gt;&gt; f3 = uint16([[0,1,0,1],
                [0,0,1,1]])</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; print mmlimits(f3)</pre>
              <pre class="computer">[    0 65535]</pre>
              <pre class="user">&gt;&gt;&gt; print mmdatatype(f3)</pre>
              <pre class="computer">uint16</pre>
              <pre class="user">&gt;&gt;&gt; f4 = int32([[0,1,0,1],
               [0,0,1,1]])</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; print mmlimits(f4)</pre>
              <pre class="computer">[-2147483647  2147483647]</pre>
              <pre class="user">&gt;&gt;&gt; print mmdatatype(f4)</pre>
              <pre class="computer">int32</pre>
            </div>
          </div>
        </p>
      </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/mmbinary.html">mmbinary</a></td>
              <td class="def">Convert a gray-scale image into a binary image</td>
            </tr>
            <tr>
              <td class="term"><a href="../morph/uint8.html">uint8</a></td>
              <td class="def">Convert an image to an uint8 image.</td>
            </tr>
            <tr>
              <td class="term"><a href="../morph/uint16.html">uint16</a></td>
              <td class="def">Convert an image to a uint16 image.</td>
            </tr>
            <tr>
              <td class="term"><a href="../morph/int32.html">int32</a></td>
              <td class="def">Convert an image to an int32 image.</td>
            </tr>
            <tr>
              <td class="term"><a href="../morph/mmshow.html">mmshow</a></td>
              <td class="def">Display binary or gray-scale images and optionally overlay it with binary images.</td>
            </tr>
            <tr>
              <td class="term"><a href="../morph/mmdatatype.html">mmdatatype</a></td>
              <td class="def">Return the image datatype string</td>
            </tr>
            <tr>
              <td class="term"><a href="../morph/mmlimits.html">mmlimits</a></td>
              <td class="def">Get the possible minimum and maximum of an image.</td>
            </tr>
            <tr>
              <td class="term"><a href="../morph/mmfreedom.html">mmfreedom</a></td>
              <td class="def">Control automatic data type conversion.</td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
    <center>
      <table class="botNav">
        <tr>
          <td class="index">
                    [<a href="index.html">Up</a>]
                    
                    [<a href="../mmtypes/mmSe.html"><tt>mmSe</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>