<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry version="5.0-subset Scilab" xml:id="detecteyes" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:ns5="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:db="http://docbook.org/ns/docbook">
  <info>
    <pubdate>September, 2008</pubdate>
  </info>

  <refnamediv xml:id="detectlefteyes">
    <refname>detectlefteyes</refname>

    <refpurpose>Find left eyes in the image.</refpurpose>
  </refnamediv>

  <refnamediv xml:id="detectrighteyes">
    <refname>detectrighteyes</refname>

    <refpurpose>Find right eyes in the image.</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <title>Calling Sequence</title>

    <synopsis>leyes = detectlefteyes(im)
reyes = detectrighteyes(im)</synopsis>
  </refsynopsisdiv>

  <refsection>
    <title>Parameters</title>

    <variablelist>
      <varlistentry>
        <term>im</term>

        <listitem>
           The input image, color or gray image. 
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>leyes, reyes</term>

        <listitem>
           An Nx4 matrix. Each row of the matrix contains information about an teye position and size: [x,y,w,h]. (x,y) is the top-left corner coordinates of a rectangle contains an eye; w,h are width and height of the rectangle respectively. 
        </listitem>
      </varlistentry>
    </variablelist>
  </refsection>

  <refsection>
    <title>Description</title>

    <para>The function finds left/right eyes in an image.</para>

    <para>The result of lefteye detection or righteye detection is not enough
    accuracy as the face detection; results of lefteye detection and righteye
    detection are quite similar in some case. In order to get proper results,
    it's better to apply lefteye detection and righteye detection functions to
    a upper half of a detected face image.</para>
  </refsection>

  <refsection>
    <title>Examples</title>

    <programlisting role="example">    im = imread(fullpath(getSIVPpath() + "/images/lena.png"));
    face = detectfaces(im);
    rect = face*diag([1,1,1,0.7]);
    subface = imcrop(im, rect);
    
    leyes = detectlefteyes(subface);
    [m,n] = size(leyes);
    for i=1:m,  
        im = rectangle(im, leyes(i,:)+rect*diag([1,1,0,0]), [0,255,0]);
    end;
    imshow(im);</programlisting>
  </refsection>

  <refsection>
    <title>Authors</title>

    <simplelist type="vert">
      <member>Shiqi Yu &lt;shiqi.yu[at]gmail.com&gt;</member>

      <member>Jia Wu &lt;jiawu83[at]gmail.com&gt;</member>
    </simplelist>
  </refsection>

  <refsection>
    <title>Bibliography</title>

    <para>"Rapid Object Detection using a Boosted Cascade of Simple Features",
    Paul Viola and Michael J. Jones, IEEE CVPR, 2001.</para>

    <para>"An Extended Set of Haar-like Features for Rapid Object Detection",
    Rainer Lienhart and Jochen Maydt, IEEE ICIP 2002, Vol. 1, pp. 900-903,
    Sep. 2002.</para>
  </refsection>

  <refsection>
    <title>Availability</title>

     The latest version of SIVP can be found at 

    <para>http://sivp.sf.net</para>

     
  </refsection>

  <refsection>
    <title>See Also</title>

    <simplelist type="inline">
      <member><link linkend="detectfaces">detectfaces</link></member>
    </simplelist>
  </refsection>
</refentry>
