<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Scilab Computer Vision Module
 * Copyright (C) 2017 - Scilab Enterprises
 *
 -->
<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="fr" xml:id="PtLists">
  <info>
    <pubdate>$LastChangedDate$</pubdate>
  </info>
  <refnamediv>
    <refname>PtLists</refname>
    <refpurpose>Collection of <link linkend="PtList">PtList</link> type</refpurpose>
  </refnamediv>
  <refsection>
    <title>Description</title>
    <para><literal>PtLists</literal> is the type used to store a collection of <link linkend="PtList">PtList</link> objects.</para>
    <para>Such objects are returned from shape analysis functions, such as <link linkend="findContours">findContours</link> for example, which returns several lists of points, each of one for each detected contour.</para>

    <para><literal>PtList</literal> supports the extraction operator <literal>(n:step:m)</literal>, returning a single or a list of <literal>PtList</literal>, depending on the size of the interval.</para>

    <para><literal>PtList</literal> supports also the <literal>size</literal> function, returning the size of the list.</para>
  </refsection>
  <refsection>
    <title>Examples</title>
    <programlisting role="example"><![CDATA[
    scicv_Init();

    img_gray = imread(getSampleImage("shapes.png"), CV_LOAD_IMAGE_GRAYSCALE);
    canny_img = Canny(img_gray, 100, 100*2, 3);

    [img_out, contours] = findContours(canny_img, CV_RETR_TREE, CV_CHAIN_APPROX_SIMPLE, [0, 0]);

    disp(typeof(contours));

    disp("Number of contours:");
    disp(size(contours));
 ]]></programlisting>
  </refsection>
  <refsection>
    <title>See also</title>
    <simplelist type="inline">
      <member>
        <link linkend="PtList">PtList</link>
      </member>
    </simplelist>
  </refsection>
</refentry>
