"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "help/en_US/edge.xml" between
sip-0.5.6.tar.gz and sip-0.12.1.tar.gz

About: SIP (Scilab Image Processing) toolbox to do imaging tasks such as filtering, blurring, edge detection, thresholding, histogram manipulation, segmentation, mathematical morphology, color image processing, etc.

edge.xml  (sip-0.5.6):edge.xml  (sip-0.12.1)
skipping to change at line 18 skipping to change at line 18
<refpurpose>Edge detection</refpurpose> <refpurpose>Edge detection</refpurpose>
</refnamediv> </refnamediv>
<refsynopsisdiv> <refsynopsisdiv>
<title>Calling Sequence</title> <title>Calling Sequence</title>
<synopsis>E = edge(Img)</synopsis> <synopsis>E = edge(Img)</synopsis>
<synopsis>E = edge(Img, &lt;named_args&gt;)</synopsis> <synopsis>E = edge(Img, &lt;named_args&gt;)</synopsis>
<synopsis>E = edge(Img, method)</synopsis> <synopsis>E = edge(Img, method)</synopsis>
<synopsis>E = edge(Img, method, thresh)</synopsis> <synopsis>E = edge(Img, method, thresh)</synopsis>
<synopsis>E = edge(Img, method, thresh, direction)</synopsis> <synopsis>E = edge(Img, method, thresh, direction)</synopsis>
<synopsis>E = edge(Img, method, thresh, direction, sigma)</synopsis> <synopsis>E = edge(Img, method, thresh, sigma)</synopsis>
<synopsis>[E, thresh] = edge(im, method, ...)</synopsis>
</refsynopsisdiv> </refsynopsisdiv>
<refsection> <refsection>
<title>Parameters</title> <title>Parameters</title>
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>Img</term> <term>Img</term>
<listitem> <listitem>
M x N Grayscale (intensity) image in any range. M x N Grayscale (intensity) image in any range.
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>method</term> <term>method</term>
<listitem> <listitem>
may be &apos;sobel&apos;(default), &apos;prewitt&apos; or &apos;fftderiv& apos;. Other methods will appear in the future. may be &apos;sobel&apos;(default), &apos;prewitt&apos; &apos;fftderiv&apo s; or 'canny'. SIVP (a fork of SIP) also provides 'LoG'. Other methods will appe ar in the future.
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>thresh</term> <term>thresh</term>
<listitem> <listitem>
sets the threshold level, from 0 to 1. Defaults to 0.5. If negative, then the output image, <literal>E</literal>, will have the un-thresholded gradient i mage. sets the threshold level, from 0 to 1, except for the Canny method. Defau lts to 0.5. If negative, then the output image, <literal>E</literal>, will have the un-thresholded gradient image. For the Canny method, this is a two-element v ector where the first element is the low threshold and the second one is the hig h threshold defining the weak and strong edges, respectively. If this is a scala r in Canny, the low threshold is <literal>0.4*thresh</literal> and the high thr eshold is just <literal>thresh</literal>. For Canny, thresholds cannot be a nega tive scalar and are always relative to the highest internally computed gradient magnitude of the image. The best way to find a good threshold is by trial and er ror (e.g., binary searching). Future methods will appear in the future.
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>direction</term> <term>direction</term>
<listitem> <listitem>
may be &apos;horizontal&apos;, &apos;vertical&apos; or &apos;both&apos;( default). This determines the direction to compute the image gradient. may be &apos;horizontal&apos;, &apos;vertical&apos; or &apos;both&apos;( default). This determines the direction to compute the image gradient.
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>sigma</term> <term>sigma or kernel width</term>
<listitem> <listitem>
Controls the ammount of high-frequency attenuation in some Controls the ammount of high-frequency attenuation in some
methods (only the &apos;fftderiv&apos; method uses this methods, and can be used to obtain different levels of
parameter). This can be used to obtain different levels of detail and to filter out noise. This is the sigma of the Gaussian filter
detail and to filter out high-frequency noise. Defaults for the &apos;fftderiv&apos; method, for which it defaults
to 1. to 1. For the Canny method, this means the Sobel kernel size (width) and
must be 3, 5 or 7.
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>&lt;named_args&gt;</term> <term>&lt;named_args&gt;</term>
<listitem> <listitem>
This is a sequence of statements key1=value1, This is a sequence of statements key1=value1,
key2=value2,... where key1, key2,... can be any of the key2=value2,... where key1, key2,... can be any of the
optional arguments above, in any order. optional arguments above, in any order.
</listitem> </listitem>
</varlistentry> </varlistentry>
skipping to change at line 106 skipping to change at line 107
Img = imread('tru.jpg'); Img = imread('tru.jpg');
Img = im2gray(Img); Img = im2gray(Img);
clf clf
imshow(Img); imshow(Img);
e = edge(Img); // sobel, thresh = 0.5 e = edge(Img); // sobel, thresh = 0.5
clf clf
imshow(e,2) imshow(e,2)
e = edge(Img,'prewitt'); // thresh = 0.5 e = edge(Img, 'prewitt'); // thresh = 0.5
clf clf
imshow(e,2) imshow(e,2)
e = edge(Img,'fftderiv', 0.4); // FFT gradient method; 0.4 threshold e = edge(Img, 'canny', [0.06 0.2]);
clf
imshow(e,2)
e = edge(Img, 'fftderiv', 0.4); // FFT gradient method; 0.4 threshold
clf clf
imshow(e,[]) imshow(e,[])
// It is useful to thin the edges, eliminating redundant pixels: // It is useful to thin the edges, eliminating redundant pixels:
e = thin(e); e = thin(e);
clf clf
imshow(e,[]) imshow(e,[])
e = edge(Img,'fftderiv',sigma=3,thresh=-1); // thicker edges, no threshold e = edge(Img,'fftderiv',sigma=3,thresh=-1); // thicker edges, no threshold
clf clf
imshow(e,[]) imshow(e,[])
e = edge(Img,thresh=-1); e = edge(Img,thresh=-1);
clf clf
imshow(e,[]) imshow(e,[])
chdir(initial_dir); chdir(initial_dir);
]]></programlisting> ]]></programlisting>
</refsection> </refsection>
<para><emphasis role="bold">The original image, sobel edges (threshold 0.5), pre
witt edges (threshold 0.5), Canny edges from OpenCV (thresholds 0.06 and 0.2), F
FT approach (threshold 0.4), thinned edges from the FFT approach, un-thresholded
edges from the FFT approach, and un-thresholded Sobel edges:</emphasis></para>
<para><imagedata fileref="../../images/tru.jpg" />
<imagedata fileref="../images/tru-sobel-thresh_0.5.png" />
<imagedata fileref="../images/tru-prewitt-thresh_0.5.png" />
<imagedata fileref="../images/tru-canny-thresh_0.06_0.2.png" />
<imagedata fileref="../images/tru-ffttderiv-thesh_0.4.png" />
<imagedata fileref="../images/tru-ffttderiv-thesh_0.4-thin.png" />
<imagedata fileref="../images/tru-ffttderiv-sigma_3-nothresh.png" />
<imagedata fileref="../images/tru-sobel-nothresh.png" />
</para>
<refsection> <refsection>
<title>References</title> <title>References</title>
<para> <para>
"Shape Analysis and Classification", L. da "Shape Analysis and Classification", L. da
F. Costa and R. M. Cesar Jr., CRC Press, section 3.3. F. Costa and R. M. Cesar Jr., CRC Press, section 3.3.
</para> </para>
</refsection> </refsection>
<refsection><title>Authors</title><simplelist type="vert"> <refsection><title>Authors</title><simplelist type="vert">
<member>Ricardo Fabbri &lt;ricardofabbri[at]users.sf.net&gt;</member> <member>Ricardo Fabbri &lt;ricardofabbri[at]users.sf.net&gt;</member>
 End of changes. 8 change blocks. 
10 lines changed or deleted 30 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS