<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab Computer Vision Module
 * Copyright (C) 2017 - Scilab Enterprises
 *
 -->
<refentry 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="fr" xml:id="Canny">
  <info>
    <pubdate>$LastChangedDate$</pubdate>
  </info>
  <refnamediv>
    <refname>Canny</refname>
    <refpurpose>Finds edges in an image</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <title>Syntax</title>
    <synopsis>img_out = Canny(img_in, threshold1, threshold2, apertureSize[, L2gradient])</synopsis>
  </refsynopsisdiv>
  <refsection>
    <title>Parameters</title>
    <variablelist>
      <varlistentry>
        <term>img_in</term>
        <listitem>
          <para>Input image (single channel 8-bit) (<link linkend="Mat">Mat</link>).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>threshold1</term>
        <listitem>
          <para>First threshold for the hysteresis procedure (double).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>threshold2</term>
        <listitem>
          <para>Second threshold for the hysteresis procedure (double).</para>
        </listitem>
      </varlistentry>
	  <varlistentry>
        <term>apertureSize</term>
        <listitem>
          <para>Aperture size for the Sobel operator (double) (default 3).</para>
        </listitem>
      </varlistentry>
	  <varlistentry>
        <term>L2gradient</term>
        <listitem>
          <para>Flag indicating to use the more accurate L2 norm for the image gradient magnitude (double) (default %f).</para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>img_out</term>
        <listitem>
          <para>Output image (<link linkend="Mat">Mat</link>).</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsection>
  <refsection>
    <title>Description</title>
    <para><function>Canny</function> finds edges in an image using the Canny algorithm.</para>
  </refsection>
  <refsection>
    <title>Examples</title>
    <programlisting role="example"><![CDATA[
    scicv_Init();

    img_gray = imread(getSampleImage("shapes.png"), CV_LOAD_IMAGE_GRAYSCALE);

    subplot(1,2,1);
    matplot(img_gray);

    thresh = 100;
    img_canny = Canny(img_gray, thresh, thresh*2, 3);

    subplot(1,2,2);
    matplot(img_canny);

    delete_Mat(img_gray);
    delete_Mat(img_canny);
 ]]></programlisting>
  </refsection>
</refentry>