"Fossies" - the Fresh Open Source Software Archive

Member "sip-0.12.1/help/en_US/imshow.xml" (9 Apr 2012, 6704 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 "imshow.xml": 0.5.6_vs_0.12.1.

    1 <?xml version="1.0" encoding="ISO-8859-1"?> <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="imshow">
    2 
    3 <info> <pubdate>February 2004</pubdate> </info>
    4 <refnamediv>
    5   <refname>imshow</refname>
    6   <refpurpose>Displays images in the Scilab graphic window</refpurpose>
    7 </refnamediv>
    8 
    9 <refsynopsisdiv>
   10   <title>Calling Sequence</title>
   11   <synopsis>imshow(Img)</synopsis>
   12   <synopsis>imshow(Img,n)</synopsis>
   13   <synopsis>imshow(Img,[low high])</synopsis>
   14   <synopsis>imshow(Img,Map)</synopsis>
   15   <synopsis>imshow(RGBImg)</synopsis>
   16   <synopsis>imshow filename</synopsis>
   17   <synopsis>imshow(Img, [arg2 , strf, viewer])</synopsis>
   18 </refsynopsisdiv>
   19 
   20 <refsection>
   21 <title>Parameters</title>
   22 
   23 <variablelist>
   24    <varlistentry>
   25      <term>filename</term>
   26      <listitem>
   27      A string, the image filename to be created. The extension determines the type of the image.
   28      </listitem>
   29    </varlistentry>
   30 
   31    <varlistentry>
   32      <term>Img</term>
   33      <listitem>
   34      MxN matrix, a grayscale (0-1 range) or pseudo-color/indexed (1-Ncolors range) image.
   35      </listitem>
   36    </varlistentry>
   37 
   38    <varlistentry>
   39      <term>n</term>
   40      <listitem>
   41      A scalar, the number of levels of gray to display Img. 1x2 array
   42      corresponding to the grayscale range to be considered.
   43      </listitem>
   44    </varlistentry>
   45 
   46    <varlistentry>
   47      <term>[low high]</term>
   48      <listitem>
   49      1x2 array corresponding to the grayscale  range  to be considered.
   50      </listitem>
   51    </varlistentry>
   52 
   53    <varlistentry>
   54      <term>Map</term>
   55      <listitem>
   56      Mx3 matrix containing the image colormap (for indexed images). Entries may range from 0 to 1
   57      </listitem>
   58    </varlistentry>
   59 
   60    <varlistentry>
   61      <term>RGBImg</term>
   62      <listitem>
   63      MxNx3 hypermatrix in 0-1 range.
   64      </listitem>
   65    </varlistentry>
   66 
   67    <varlistentry>
   68      <term>viewer</term>
   69      <listitem>
   70      The image viewer to use: 'sci' for scilab, 'display' for imagemagick, or
   71      any name of an image viewer program in your PATH (such as 'eog' or 'xv').
   72      You can also set your image viewer globally by altering the SIPVIEWER
   73      variable within scilab. For instance: <programlisting role="example"><![CDATA[
   74 
   75       imshow(img, viewer='display')  // same as imshow but uses external viewer
   76 
   77       SIPVIEWER = 'display'
   78       imshow(img)                    // same as before but uses SIPVIEWER to determine the viewer
   79 
   80 ]]></programlisting>
   81      </listitem>
   82    </varlistentry>
   83 
   84    <varlistentry>
   85      <term>strf</term>
   86      <listitem>
   87    this is used to e.g. put axes around your image. See the plot2d help page.
   88    You may use this optional parameter in the assignment style, as in <programlisting role="example"><![CDATA[
   89 
   90       imshow(img,strf='041')  // same as imshow but draw axes
   91 
   92 ]]></programlisting>
   93      </listitem>
   94    </varlistentry>
   95 
   96 </variablelist>
   97 </refsection>
   98 
   99 <refsection>
  100   <title>Description</title>
  101 
  102    <variablelist>
  103 
  104      <varlistentry>
  105        <term>imshow(Img, n)</term>
  106        <listitem>
  107        displays Img using n gray levels. Img is an  MxN matrix in 0 -
  108        (n-1) range. If n is omitted, it will  be assumed to be 256.
  109        </listitem>
  110      </varlistentry>
  111 
  112      <varlistentry>
  113        <term>imshow(Img, [low high])</term>
  114        <listitem>
  115        displays Img using a grayscale  within the
  116        specified range. Elements &lt;= low will map onto  black, Elements
  117        &gt;= high will map onto white, and elements  in between will map
  118        as a shade of gray. If an empty matrix  <literal>&apos;[]&apos;</literal> is used,
  119        <literal>[low,high]</literal> will be assumed to be <literal>[min(Img),  max(Img)]</literal>. 
  120        </listitem>
  121      </varlistentry>
  122 
  123      <varlistentry>
  124        <term>imshow(Img, Map)</term>
  125        <listitem>
  126         displays Img using the specified colormap. 
  127        </listitem>
  128      </varlistentry>
  129 
  130      <varlistentry>
  131        <term>imshow(RGBImg)</term>
  132        <listitem>
  133        displays the RGBImg MxNx3 (0-1) truecolor  image. 
  134        </listitem>
  135      </varlistentry>
  136 
  137      <varlistentry>
  138        <term>imshow(&apos;filename&apos;)</term>
  139        <listitem>
  140        displays the image <literal>filename</literal> in the scilab  graphical
  141        window. Any raster image format is accepted (see Remarks section). 
  142        </listitem>
  143      </varlistentry>
  144 
  145    </variablelist>
  146 
  147 </refsection>
  148 
  149 <refsection><title>Examples</title><programlisting role="example"><![CDATA[
  150 
  151     initial_dir = PWD;
  152     chdir (SIPDIR + 'images');
  153 
  154     a = rand(100,100);   // create random image
  155     clf;
  156     imshow(a);
  157 
  158     imshow(a*255 + 1,hotcolormap(256));
  159     imshow(a,[0.3 0.6]);
  160     imshow(a,[]);
  161     clf;
  162     imshow('example.png');
  163 
  164     chdir(initial_dir);
  165 
  166 ]]></programlisting></refsection>
  167 
  168 <refsection><title>Remarks</title>
  169 In  theory,  <literal>imshow(filename)</literal>  will  work  with any raster
  170 image format.  In practice, it has been  tested  only for BMP,
  171 GIF, JPEG, PNG, PCX, TIFF, XPM, and MIFF. Displaying other file
  172 formats will probably work, but this case  have not been tested by
  173 the developers of the SIP toolbox.
  174 </refsection>
  175 <refsection><title>Bugs and Shortcomings</title>
  176 <para>
  177    The display of truecolor images in Scilab is somewhat inefficient. Perhaps
  178    you'd want to use an external viewer using the <literal>viewer</literal>
  179    parameter.
  180 </para>
  181 <para>
  182    Images are stored in double precision matrices. Hopefully,
  183    the next release will make usage of integer types.
  184 </para>
  185 
  186 </refsection>
  187 
  188 
  189 <refsection><title>Authors</title><simplelist type="vert">
  190   <member>Ricardo Fabbri &lt;ricardofabbri[at]users.sf.net&gt;</member>
  191 </simplelist></refsection>
  192 
  193 <refsection><title>Availability</title>
  194 The latest version of SIP can be found at
  195 <para>http://siptoolbox.sf.net </para>
  196 </refsection>
  197 
  198    <refsection><title>See Also</title><simplelist type="inline">
  199       <member> <link linkend="imread">imread</link> </member>
  200       <member> <link linkend="imwrite">imwrite</link> </member>
  201       <member> <link linkend="imfinfo">imfinfo</link> </member>
  202       <member> <link type="scilab" linkend="scilab.help/Matplot">Matplot</link></member>
  203       <member> <link type="scilab" linkend="scilab.help/xgetpixel">xgetpixel</link></member>
  204    </simplelist></refsection>
  205 </refentry>
  206 <!-- =================================================== 
  207            SIP - Scilab Image Processing toolbox
  208            Copyright (C) 2002-2004  Ricardo Fabbri
  209 
  210        See the file COPYING for license-related issues
  211      =================================================== -->