"Fossies" - the Fresh Open Source Software Archive

Member "doc_html/Poisson_surface_reconstruction_3/xml/indexpage.xml" (8 Nov 2019, 71090 Bytes) of package /linux/misc/CGAL-5.0-doc_html.tar.xz:


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 last Fossies "Diffs" side-by-side code changes report for "indexpage.xml": 4.12.1-doc_html_vs_4.13-doc_html.

    1 <?xml version='1.0' encoding='UTF-8' standalone='no'?>
    2 <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.13">
    3   <compounddef id="indexpage" kind="page">
    4     <compoundname>index</compoundname>
    5     <title>User Manual</title>
    6     <detaileddescription>
    7 <para><anchor id="index_1Chapter_Poisson_Surface_Reconstruction"/></para><para><simplesect kind="authors"><para>Pierre Alliez, Laurent Saboret, Ga<eumlaut/>l Guennebaud</para></simplesect>
    8 </para><sect1 id="index_1Poisson_surface_reconstruction_3Introduction">
    9 <title>Introduction</title>
   10 <para>This CGAL component implements a surface reconstruction method which takes as input point sets with oriented normals and computes an implicit function. We assume that the input points contain no outliers and little noise. The output surface mesh is generated by extracting an isosurface of this function with the CGAL Surface Mesh Generator <ref refid="citelist_1CITEREF_cgal:ry-gsddrm-06" kindref="member">[4]</ref> or potentially with any other surface contouring algorithm.</para><para><anchor id="index_1fig__Poisson_surface_reconstruction_3figintroduction"/><image type="html" name="introduction.jpg"></image>
   11  <image type="latex" name="introduction.jpg" width="15cm"></image>
   12   <ref refid="index_1fig__Poisson_surface_reconstruction_3figintroduction" kindref="member">fig__Poisson_surface_reconstruction_3figintroduction</ref> Poisson surface reconstruction.<linebreak/>
   13 Left: 17K points sampled on the statue of an elephant with a Minolta laser scanner. Right: reconstructed surface mesh. </para><para>More specifically, the core surface reconstruction algorithm consists of computing an implicit function which is an approximate indicator function of the inferred solid (Poisson Surface Reconstruction - referred to as Poisson). Poisson is a two steps process: it requires solving for the implicit function before function evaluation.</para></sect1>
   14 <sect1 id="index_1Poisson_surface_reconstruction_3Common">
   15 <title>Common Reconstruction Pipeline</title>
   16 <para>Surface reconstruction from point sets is often a sequential process with the following steps: 1) Scanning and scan alignment produce a set of points or points with normals; 2) Outlier removal; 3) Simplification to reduce the number of input points; 4) Smoothing to reduce noise in the input data; 5) Normal estimation and orientation when the normals are not already provided by the acquisition device; and 6) Surface reconstruction.</para><para>CGAL provides algorithms for all steps listed above except alignment.</para><para>Chapter <ref refid="index_1chappoint_set_processing_3" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Point_set_processing_3.tag">Point Set Processing</ref> describes algorithms to pre-process the point set before reconstruction with functions devoted to the simplification, outlier removal, smoothing, normal estimation and normal orientation.</para><para><anchor id="index_1fig__Poisson_surface_reconstruction_3figpipeline"/><image type="html" name="pipeline.jpg"></image>
   17  <image type="latex" name="pipeline.jpg" width="15cm"></image>
   18   <ref refid="index_1fig__Poisson_surface_reconstruction_3figpipeline" kindref="member">fig__Poisson_surface_reconstruction_3figpipeline</ref> Common surface reconstruction pipeline. </para></sect1>
   19 <sect1 id="index_1Poisson_surface_reconstruction_3Poisson">
   20 <title>Poisson</title>
   21 <para>Given a set of 3D points with oriented normals (denoted oriented points in the sequel) sampled on the boundary of a 3D solid, the Poisson Surface Reconstruction method <ref refid="citelist_1CITEREF_Kazhdan06" kindref="member">[2]</ref> solves for an approximate indicator function of the inferred solid, whose gradient best matches the input normals. The output scalar function, represented in an adaptive octree, is then iso-contoured using an adaptive marching cubes.</para><para>CGAL implements a variant of this algorithm which solves for a piecewise linear function on a 3D Delaunay triangulation instead of an adaptive octree. The algorithm takes as input a set of 3D oriented points. It builds a 3D Delaunay triangulation from these points and refines it by Delaunay refinement so as to remove all badly shaped (non isotropic) tetrahedra and to tessellate a loose bounding box of the input oriented points. The normal of each Steiner point added during refinement is set to zero. It then solves for a scalar indicator function <formula id="0">$ f$</formula> represented as a piecewise linear function over the refined triangulation. More specifically, it solves for the Poisson equation <formula id="1">$ \Delta f = div(\mathbf{n})$</formula> at each vertex of the triangulation using a sparse linear solver. Eventually, the CGAL surface mesh generator extracts an isosurface with function value set by default to be the median value of <formula id="0">$ f$</formula> at all input points.</para></sect1>
   22 <sect1 id="index_1Poisson_surface_reconstruction_3Function">
   23 <title>Reconstruction Function</title>
   24 <para>A global function <computeroutput><ref refid="group__PkgPoissonSurfaceReconstruction3Ref_1ga2470854cf03552ecee02f11c17024ddf" kindref="member">poisson_surface_reconstruction_delaunay()</ref></computeroutput> is provided. It takes points with normals as input and handles the whole reconstruction pipeline :</para><para><itemizedlist>
   25 <listitem><para>it computes the implicit function</para></listitem><listitem><para>it reconstructs the surface with a given precision using the CGAL surface mesh generator based on Delaunay refinement <ref refid="citelist_1CITEREF_cgal:ry-gsddrm-06" kindref="member">[4]</ref> <ref refid="citelist_1CITEREF_cgal:bo-pgsms-05" kindref="member">[1]</ref></para></listitem><listitem><para>it outputs the result in a polygon mesh.</para></listitem></itemizedlist>
   26 </para><para>This function aims at providing a quick and user-friendly API for Poisson reconstruction. Advanced users may be interested in using the class (see <ref refid="index_1Poisson_surface_reconstruction_3Class" kindref="member">Reconstruction Class</ref>) which allows them, for example, to use another surface mesher or a different output structure.</para><sect2 id="index_1Poisson_surface_reconstruction_3Example_function">
   27 <title>Example</title>
   28 <para>The following example reads a point set and reconstructs a surface using Poisson reconstruction.</para><para><linebreak/>
   29 <bold>File</bold> <ref refid="Poisson_surface_reconstruction_3_2poisson_reconstruction_function_8cpp-example" kindref="compound">Poisson_surface_reconstruction_3/poisson_reconstruction_function.cpp</ref> <programlisting><codeline><highlight class="preprocessor">#include<sp/>&lt;CGAL/Exact_predicates_inexact_constructions_kernel.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   30 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/Polyhedron_3.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   31 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/poisson_surface_reconstruction.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   32 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/IO/read_xyz_points.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   33 <codeline><highlight class="normal"></highlight></codeline>
   34 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;vector&gt;</highlight><highlight class="normal"></highlight></codeline>
   35 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;fstream&gt;</highlight><highlight class="normal"></highlight></codeline>
   36 <codeline><highlight class="normal"></highlight></codeline>
   37 <codeline><highlight class="normal"></highlight><highlight class="comment">//<sp/>Types</highlight><highlight class="normal"></highlight></codeline>
   38 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="classCGAL_1_1Exact__predicates__inexact__constructions__kernel" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Kernel_23.tag">CGAL::Exact_predicates_inexact_constructions_kernel</ref><sp/>Kernel;</highlight></codeline>
   39 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="classKernel_1_1Point__3" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Kernel_23.tag">Kernel::Point_3</ref><sp/>Point;</highlight></codeline>
   40 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="classKernel_1_1Vector__3" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Kernel_23.tag">Kernel::Vector_3</ref><sp/>Vector;</highlight></codeline>
   41 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/>std::pair&lt;Point,<sp/>Vector&gt;<sp/>Pwn;</highlight></codeline>
   42 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/>CGAL::Polyhedron_3&lt;Kernel&gt;<sp/>Polyhedron;</highlight></codeline>
   43 <codeline><highlight class="normal"></highlight></codeline>
   44 <codeline><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>main(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
   45 <codeline><highlight class="normal">{</highlight></codeline>
   46 <codeline><highlight class="normal"><sp/><sp/>std::vector&lt;Pwn&gt;<sp/>points;</highlight></codeline>
   47 <codeline><highlight class="normal"><sp/><sp/>std::ifstream<sp/>stream(</highlight><highlight class="stringliteral">&quot;data/kitten.xyz&quot;</highlight><highlight class="normal">);</highlight></codeline>
   48 <codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!stream<sp/>||</highlight></codeline>
   49 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>!<ref refid="group__PkgPointSetProcessing3IO_1ga2e8d677def85c5582ba1f01eda030628" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Point_set_processing_3.tag">CGAL::read_xyz_points</ref>(</highlight></codeline>
   50 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stream,</highlight></codeline>
   51 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::back_inserter(points),</highlight></codeline>
   52 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>CGAL::parameters::point_map(CGAL::First_of_pair_property_map&lt;Pwn&gt;()).</highlight></codeline>
   53 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>normal_map(CGAL::Second_of_pair_property_map&lt;Pwn&gt;())))</highlight></codeline>
   54 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
   55 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>std::cerr<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;Error:<sp/>cannot<sp/>read<sp/>file<sp/>data/kitten.xyz&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>std::endl;</highlight></codeline>
   56 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>EXIT_FAILURE;</highlight></codeline>
   57 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
   58 <codeline><highlight class="normal"></highlight></codeline>
   59 <codeline><highlight class="normal"><sp/><sp/>Polyhedron<sp/>output_mesh;</highlight></codeline>
   60 <codeline><highlight class="normal"><sp/><sp/></highlight></codeline>
   61 <codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>average_spacing<sp/>=<sp/>CGAL::compute_average_spacing&lt;CGAL::Sequential_tag&gt;</highlight></codeline>
   62 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>(points,<sp/>6,<sp/>CGAL::parameters::point_map(CGAL::First_of_pair_property_map&lt;Pwn&gt;()));</highlight></codeline>
   63 <codeline><highlight class="normal"></highlight></codeline>
   64 <codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<ref refid="group__PkgPoissonSurfaceReconstruction3Ref_1ga2470854cf03552ecee02f11c17024ddf" kindref="member">CGAL::poisson_surface_reconstruction_delaunay</ref></highlight></codeline>
   65 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>(points.begin(),<sp/>points.end(),</highlight></codeline>
   66 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>CGAL::First_of_pair_property_map&lt;Pwn&gt;(),</highlight></codeline>
   67 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>CGAL::Second_of_pair_property_map&lt;Pwn&gt;(),</highlight></codeline>
   68 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/>output_mesh,<sp/>average_spacing))</highlight></codeline>
   69 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
   70 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::ofstream<sp/>out(</highlight><highlight class="stringliteral">&quot;kitten_poisson-20-30-0.375.off&quot;</highlight><highlight class="normal">);</highlight></codeline>
   71 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>out<sp/>&lt;&lt;<sp/>output_mesh;</highlight></codeline>
   72 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
   73 <codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">else</highlight><highlight class="normal"></highlight></codeline>
   74 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>EXIT_FAILURE;</highlight></codeline>
   75 <codeline><highlight class="normal"></highlight></codeline>
   76 <codeline><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>EXIT_SUCCESS;</highlight></codeline>
   77 <codeline><highlight class="normal">}</highlight></codeline>
   78 </programlisting></para></sect2>
   79 </sect1>
   80 <sect1 id="index_1Poisson_surface_reconstruction_3Class">
   81 <title>Reconstruction Class</title>
   82 <para>The class template declaration is <computeroutput>template&lt;class Gt&gt; class <ref refid="classCGAL_1_1Poisson__reconstruction__function" kindref="compound">Poisson_reconstruction_function</ref></computeroutput> where <computeroutput>Gt</computeroutput> is a geometric traits class.</para><para>For details see: <computeroutput><ref refid="classCGAL_1_1Poisson__reconstruction__function" kindref="compound">Poisson_reconstruction_function</ref>&lt;GeomTraits&gt;</computeroutput></para><sect2 id="index_1Poisson_surface_reconstruction_3Example_class">
   83 <title>Example</title>
   84 <para>The following example reads a point set, creates a Poisson implicit function and reconstructs a surface.</para><para><linebreak/>
   85 <bold>File</bold> <ref refid="Poisson_surface_reconstruction_3_2poisson_reconstruction_example_8cpp-example" kindref="compound">Poisson_surface_reconstruction_3/poisson_reconstruction_example.cpp</ref> <programlisting><codeline><highlight class="preprocessor">#include<sp/>&lt;CGAL/Exact_predicates_inexact_constructions_kernel.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   86 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/Polyhedron_3.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   87 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/Surface_mesh_default_triangulation_3.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   88 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/make_surface_mesh.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   89 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/Implicit_surface_3.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   90 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/IO/facets_in_complex_2_to_triangle_mesh.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   91 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/Poisson_reconstruction_function.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   92 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/Point_with_normal_3.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   93 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/property_map.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   94 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/IO/read_xyz_points.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   95 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/compute_average_spacing.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   96 <codeline><highlight class="normal"></highlight></codeline>
   97 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;CGAL/Polygon_mesh_processing/distance.h&gt;</highlight><highlight class="normal"></highlight></codeline>
   98 <codeline><highlight class="normal"></highlight></codeline>
   99 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;vector&gt;</highlight><highlight class="normal"></highlight></codeline>
  100 <codeline><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>&lt;fstream&gt;</highlight><highlight class="normal"></highlight></codeline>
  101 <codeline><highlight class="normal"></highlight></codeline>
  102 <codeline><highlight class="normal"></highlight><highlight class="comment">//<sp/>Types</highlight><highlight class="normal"></highlight></codeline>
  103 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="classCGAL_1_1Exact__predicates__inexact__constructions__kernel" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Kernel_23.tag">CGAL::Exact_predicates_inexact_constructions_kernel</ref><sp/>Kernel;</highlight></codeline>
  104 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="classunspecified__type" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Manual.tag">Kernel::FT</ref><sp/>FT;</highlight></codeline>
  105 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="classKernel_1_1Point__3" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Kernel_23.tag">Kernel::Point_3</ref><sp/>Point;</highlight></codeline>
  106 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/>CGAL::Point_with_normal_3&lt;Kernel&gt;<sp/>Point_with_normal;</highlight></codeline>
  107 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="classKernel_1_1Sphere__3" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Kernel_23.tag">Kernel::Sphere_3</ref><sp/>Sphere;</highlight></codeline>
  108 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/>std::vector&lt;Point_with_normal&gt;<sp/>PointList;</highlight></codeline>
  109 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/>CGAL::Polyhedron_3&lt;Kernel&gt;<sp/>Polyhedron;</highlight></codeline>
  110 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="classCGAL_1_1Poisson__reconstruction__function" kindref="compound">CGAL::Poisson_reconstruction_function&lt;Kernel&gt;</ref><sp/>Poisson_reconstruction_function;</highlight></codeline>
  111 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="classCGAL_1_1Surface__mesh__default__triangulation__3" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">CGAL::Surface_mesh_default_triangulation_3</ref><sp/>STr;</highlight></codeline>
  112 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="classCGAL_1_1Surface__mesh__complex__2__in__triangulation__3" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">CGAL::Surface_mesh_complex_2_in_triangulation_3&lt;STr&gt;</ref><sp/>C2t3;</highlight></codeline>
  113 <codeline><highlight class="normal"></highlight><highlight class="keyword">typedef</highlight><highlight class="normal"><sp/><ref refid="classCGAL_1_1Implicit__surface__3" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">CGAL::Implicit_surface_3&lt;Kernel, Poisson_reconstruction_function&gt;</ref><sp/>Surface_3;</highlight></codeline>
  114 <codeline><highlight class="normal"></highlight></codeline>
  115 <codeline><highlight class="normal"></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>main(</highlight><highlight class="keywordtype">void</highlight><highlight class="normal">)</highlight></codeline>
  116 <codeline><highlight class="normal">{</highlight></codeline>
  117 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Poisson<sp/>options</highlight><highlight class="normal"></highlight></codeline>
  118 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>FT<sp/>sm_angle<sp/>=<sp/>20.0;<sp/></highlight><highlight class="comment">//<sp/>Min<sp/>triangle<sp/>angle<sp/>in<sp/>degrees.</highlight><highlight class="normal"></highlight></codeline>
  119 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>FT<sp/>sm_radius<sp/>=<sp/>30;<sp/></highlight><highlight class="comment">//<sp/>Max<sp/>triangle<sp/>size<sp/>w.r.t.<sp/>point<sp/>set<sp/>average<sp/>spacing.</highlight><highlight class="normal"></highlight></codeline>
  120 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>FT<sp/>sm_distance<sp/>=<sp/>0.375;<sp/></highlight><highlight class="comment">//<sp/>Surface<sp/>Approximation<sp/>error<sp/>w.r.t.<sp/>point<sp/>set<sp/>average<sp/>spacing.</highlight><highlight class="normal"></highlight></codeline>
  121 <codeline><highlight class="normal"></highlight></codeline>
  122 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Reads<sp/>the<sp/>point<sp/>set<sp/>file<sp/>in<sp/>points[].</highlight><highlight class="normal"></highlight></codeline>
  123 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Note:<sp/>read_xyz_points_and_normals()<sp/>requires<sp/>an<sp/>iterator<sp/>over<sp/>points</highlight><highlight class="normal"></highlight></codeline>
  124 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>+<sp/>property<sp/>maps<sp/>to<sp/>access<sp/>each<sp/>point&apos;s<sp/>position<sp/>and<sp/>normal.</highlight><highlight class="normal"></highlight></codeline>
  125 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>The<sp/>position<sp/>property<sp/>map<sp/>can<sp/>be<sp/>omitted<sp/>here<sp/>as<sp/>we<sp/>use<sp/>iterators<sp/>over<sp/>Point_3<sp/>elements.</highlight><highlight class="normal"></highlight></codeline>
  126 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>PointList<sp/>points;</highlight></codeline>
  127 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>std::ifstream<sp/>stream(</highlight><highlight class="stringliteral">&quot;data/kitten.xyz&quot;</highlight><highlight class="normal">);</highlight></codeline>
  128 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(!stream<sp/>||</highlight></codeline>
  129 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>!<ref refid="group__PkgPointSetProcessing3IO_1ga2e8d677def85c5582ba1f01eda030628" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Point_set_processing_3.tag">CGAL::read_xyz_points</ref>(</highlight></codeline>
  130 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>stream,</highlight></codeline>
  131 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>std::back_inserter(points),</highlight></codeline>
  132 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>CGAL::parameters::normal_map(CGAL::make_normal_of_point_with_normal_map(PointList::value_type()))))</highlight></codeline>
  133 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline>
  134 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>std::cerr<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;Error:<sp/>cannot<sp/>read<sp/>file<sp/>data/kitten.xyz&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>std::endl;</highlight></codeline>
  135 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>EXIT_FAILURE;</highlight></codeline>
  136 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline>
  137 <codeline><highlight class="normal"></highlight></codeline>
  138 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Creates<sp/>implicit<sp/>function<sp/>from<sp/>the<sp/>read<sp/>points<sp/>using<sp/>the<sp/>default<sp/>solver.</highlight><highlight class="normal"></highlight></codeline>
  139 <codeline><highlight class="normal"></highlight></codeline>
  140 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Note:<sp/>this<sp/>method<sp/>requires<sp/>an<sp/>iterator<sp/>over<sp/>points</highlight><highlight class="normal"></highlight></codeline>
  141 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>+<sp/>property<sp/>maps<sp/>to<sp/>access<sp/>each<sp/>point&apos;s<sp/>position<sp/>and<sp/>normal.</highlight><highlight class="normal"></highlight></codeline>
  142 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>The<sp/>position<sp/>property<sp/>map<sp/>can<sp/>be<sp/>omitted<sp/>here<sp/>as<sp/>we<sp/>use<sp/>iterators<sp/>over<sp/>Point_3<sp/>elements.</highlight><highlight class="normal"></highlight></codeline>
  143 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>Poisson_reconstruction_function<sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal">(points.begin(),<sp/>points.end(),</highlight></codeline>
  144 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>CGAL::make_normal_of_point_with_normal_map(PointList::value_type())<sp/>);</highlight></codeline>
  145 <codeline><highlight class="normal"></highlight></codeline>
  146 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Computes<sp/>the<sp/>Poisson<sp/>indicator<sp/>function<sp/>f()</highlight><highlight class="normal"></highlight></codeline>
  147 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>at<sp/>each<sp/>vertex<sp/>of<sp/>the<sp/>triangulation.</highlight><highlight class="normal"></highlight></codeline>
  148 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(<sp/>!<sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal">.compute_implicit_function()<sp/>)<sp/></highlight></codeline>
  149 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>EXIT_FAILURE;</highlight></codeline>
  150 <codeline><highlight class="normal"></highlight></codeline>
  151 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Computes<sp/>average<sp/>spacing</highlight><highlight class="normal"></highlight></codeline>
  152 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>FT<sp/>average_spacing<sp/>=<sp/>CGAL::compute_average_spacing&lt;CGAL::Sequential_tag&gt;(points,<sp/>6<sp/></highlight><highlight class="comment">/*<sp/>knn<sp/>=<sp/>1<sp/>ring<sp/>*/</highlight><highlight class="normal">);</highlight></codeline>
  153 <codeline><highlight class="normal"></highlight></codeline>
  154 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Gets<sp/>one<sp/>point<sp/>inside<sp/>the<sp/>implicit<sp/>surface</highlight><highlight class="normal"></highlight></codeline>
  155 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>and<sp/>computes<sp/>implicit<sp/>function<sp/>bounding<sp/>sphere<sp/>radius.</highlight><highlight class="normal"></highlight></codeline>
  156 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>Point<sp/>inner_point<sp/>=<sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal">.get_inner_point();</highlight></codeline>
  157 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>Sphere<sp/>bsphere<sp/>=<sp/></highlight><highlight class="keyword">function</highlight><highlight class="normal">.bounding_sphere();</highlight></codeline>
  158 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>FT<sp/>radius<sp/>=<sp/><ref refid="group__PkgAlgebraicFoundationsRef_1gab922269072ee9ee99ba8c541418b2e11" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Algebraic_foundations.tag">std::sqrt</ref>(bsphere.squared_radius());</highlight></codeline>
  159 <codeline><highlight class="normal"></highlight></codeline>
  160 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Defines<sp/>the<sp/>implicit<sp/>surface:<sp/>requires<sp/>defining<sp/>a</highlight><highlight class="normal"></highlight></codeline>
  161 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>conservative<sp/>bounding<sp/>sphere<sp/>centered<sp/>at<sp/>inner<sp/>point.</highlight><highlight class="normal"></highlight></codeline>
  162 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>FT<sp/>sm_sphere_radius<sp/>=<sp/>5.0<sp/>*<sp/>radius;</highlight></codeline>
  163 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>FT<sp/>sm_dichotomy_error<sp/>=<sp/>sm_distance*average_spacing/1000.0;<sp/></highlight><highlight class="comment">//<sp/>Dichotomy<sp/>error<sp/>must<sp/>be<sp/>&lt;&lt;<sp/>sm_distance</highlight><highlight class="normal"></highlight></codeline>
  164 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>Surface_3<sp/>surface(</highlight><highlight class="keyword">function</highlight><highlight class="normal">,</highlight></codeline>
  165 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Sphere(inner_point,sm_sphere_radius*sm_sphere_radius),</highlight></codeline>
  166 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sm_dichotomy_error/sm_sphere_radius);</highlight></codeline>
  167 <codeline><highlight class="normal"></highlight></codeline>
  168 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Defines<sp/>surface<sp/>mesh<sp/>generation<sp/>criteria</highlight><highlight class="normal"></highlight></codeline>
  169 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="classCGAL_1_1Surface__mesh__default__criteria__3" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">CGAL::Surface_mesh_default_criteria_3&lt;STr&gt;</ref><sp/>criteria(sm_angle,<sp/><sp/></highlight><highlight class="comment">//<sp/>Min<sp/>triangle<sp/>angle<sp/>(degrees)</highlight><highlight class="normal"></highlight></codeline>
  170 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sm_radius*average_spacing,<sp/><sp/></highlight><highlight class="comment">//<sp/>Max<sp/>triangle<sp/>size</highlight><highlight class="normal"></highlight></codeline>
  171 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>sm_distance*average_spacing);<sp/></highlight><highlight class="comment">//<sp/>Approximation<sp/>error</highlight><highlight class="normal"></highlight></codeline>
  172 <codeline><highlight class="normal"></highlight></codeline>
  173 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>Generates<sp/>surface<sp/>mesh<sp/>with<sp/>manifold<sp/>option</highlight><highlight class="normal"></highlight></codeline>
  174 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>STr<sp/>tr;<sp/></highlight><highlight class="comment">//<sp/>3D<sp/>Delaunay<sp/>triangulation<sp/>for<sp/>surface<sp/>mesh<sp/>generation</highlight><highlight class="normal"></highlight></codeline>
  175 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>C2t3<sp/>c2t3(tr);<sp/></highlight><highlight class="comment">//<sp/>2D<sp/>complex<sp/>in<sp/>3D<sp/>Delaunay<sp/>triangulation</highlight><highlight class="normal"></highlight></codeline>
  176 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="group__PkgSurfaceMesher3FunctionsMakeMesh_1ga7e188adef5bfadaafd08db82c8a25dc1" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">CGAL::make_surface_mesh</ref>(c2t3,<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>reconstructed<sp/>mesh</highlight><highlight class="normal"></highlight></codeline>
  177 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>surface,<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>implicit<sp/>surface</highlight><highlight class="normal"></highlight></codeline>
  178 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>criteria,<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>meshing<sp/>criteria</highlight><highlight class="normal"></highlight></codeline>
  179 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><ref refid="structCGAL_1_1Manifold__with__boundary__tag" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">CGAL::Manifold_with_boundary_tag</ref>());<sp/><sp/></highlight><highlight class="comment">//<sp/>require<sp/>manifold<sp/>mesh</highlight><highlight class="normal"></highlight></codeline>
  180 <codeline><highlight class="normal"></highlight></codeline>
  181 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal">(tr.number_of_vertices()<sp/>==<sp/>0)</highlight></codeline>
  182 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>EXIT_FAILURE;</highlight></codeline>
  183 <codeline><highlight class="normal"></highlight></codeline>
  184 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>saves<sp/>reconstructed<sp/>surface<sp/>mesh</highlight><highlight class="normal"></highlight></codeline>
  185 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>std::ofstream<sp/>out(</highlight><highlight class="stringliteral">&quot;kitten_poisson-20-30-0.375.off&quot;</highlight><highlight class="normal">);</highlight></codeline>
  186 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>Polyhedron<sp/>output_mesh;</highlight></codeline>
  187 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><ref refid="group__PkgSurfaceMesher3FunctionsIO_1ga39a105bd1817a9200ec5df208888e8aa" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">CGAL::facets_in_complex_2_to_triangle_mesh</ref>(c2t3,<sp/>output_mesh);</highlight></codeline>
  188 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>out<sp/>&lt;&lt;<sp/>output_mesh;</highlight></codeline>
  189 <codeline><highlight class="normal"></highlight></codeline>
  190 <codeline><highlight class="normal"></highlight></codeline>
  191 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>computes<sp/>the<sp/>approximation<sp/>error<sp/>of<sp/>the<sp/>reconstruction</highlight><highlight class="normal"></highlight></codeline>
  192 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordtype">double</highlight><highlight class="normal"><sp/>max_dist<sp/>=</highlight></codeline>
  193 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>CGAL::Polygon_mesh_processing::approximate_max_distance_to_point_set(output_mesh,</highlight></codeline>
  194 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>points,</highlight></codeline>
  195 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>4000);</highlight></codeline>
  196 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/>std::cout<sp/>&lt;&lt;<sp/></highlight><highlight class="stringliteral">&quot;Max<sp/>distance<sp/>to<sp/>point_set:<sp/>&quot;</highlight><highlight class="normal"><sp/>&lt;&lt;<sp/>max_dist<sp/>&lt;&lt;<sp/>std::endl;</highlight></codeline>
  197 <codeline><highlight class="normal"></highlight></codeline>
  198 <codeline><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">return</highlight><highlight class="normal"><sp/>EXIT_SUCCESS;</highlight></codeline>
  199 <codeline><highlight class="normal">}</highlight></codeline>
  200 </programlisting></para></sect2>
  201 <sect2 id="index_1Poisson_surface_reconstruction_3Contouring">
  202 <title>Contouring</title>
  203 <para>The computed implicit functions can be iso-contoured to reconstruct a surface by using the CGAL surface mesh generator <ref refid="citelist_1CITEREF_cgal:ry-gsddrm-06" kindref="member">[4]</ref> <ref refid="citelist_1CITEREF_cgal:bo-pgsms-05" kindref="member">[1]</ref> :</para><para><computeroutput><ref refid="group__PkgSurfaceMesher3FunctionsMakeMesh_1ga7e188adef5bfadaafd08db82c8a25dc1" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">make_surface_mesh()</ref></computeroutput></para><para>The parameter <computeroutput>Tag</computeroutput> affects the behavior of <computeroutput><ref refid="group__PkgSurfaceMesher3FunctionsMakeMesh_1ga7e188adef5bfadaafd08db82c8a25dc1" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">make_surface_mesh()</ref></computeroutput>:<itemizedlist>
  204 <listitem><para><computeroutput><ref refid="structCGAL_1_1Manifold__tag" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">Manifold_tag</ref></computeroutput>: the output mesh is guaranteed to be a manifold surface without boundary.</para></listitem><listitem><para><computeroutput><ref refid="structCGAL_1_1Manifold__with__boundary__tag" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">Manifold_with_boundary_tag</ref></computeroutput>: the output mesh is guaranteed to be manifold and may have boundaries.</para></listitem><listitem><para><computeroutput><ref refid="structCGAL_1_1Non__manifold__tag" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">Non_manifold_tag</ref></computeroutput>: the output mesh has no guarantee and hence is outputted as a polygon soup.</para></listitem></itemizedlist>
  205 </para></sect2>
  206 <sect2 id="index_1Poisson_surface_reconstruction_3Output">
  207 <title>Output</title>
  208 <para>The surface reconstructed by <computeroutput><ref refid="group__PkgSurfaceMesher3FunctionsMakeMesh_1ga7e188adef5bfadaafd08db82c8a25dc1" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">make_surface_mesh()</ref></computeroutput> is required to be a model of the concept <computeroutput><ref refid="classSurfaceMeshComplex__2InTriangulation__3" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">SurfaceMeshComplex_2InTriangulation_3</ref></computeroutput>, a data structure devised to represent a two dimensional complex embedded into a three dimensional triangulation.</para><para><computeroutput><ref refid="classSurfaceMeshComplex__2InTriangulation__3" kindref="compound" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">SurfaceMeshComplex_2InTriangulation_3</ref></computeroutput> defines the methods to traverse the reconstructed surface, and e.g. convert it to a triangle soup.</para><para>Other CGAL components provide functions to write the reconstructed surface mesh to the Object File Format (OFF) <ref refid="citelist_1CITEREF_cgal:p-gmgv16-96" kindref="member">[3]</ref> and to convert it to a polyhedron (when it is manifold):<itemizedlist>
  209 <listitem><para><computeroutput><ref refid="group__PkgSurfaceMesher3FunctionsIO_1ga7718d4e2047939882540d89fb5f28934" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">output_surface_facets_to_off()</ref></computeroutput></para></listitem><listitem><para><computeroutput>output_surface_facets_to_polyhedron()</computeroutput></para></listitem></itemizedlist>
  210 </para><para>See <ref refid="Poisson_surface_reconstruction_3_2poisson_reconstruction_example_8cpp-example" kindref="compound">poisson_reconstruction_example.cpp</ref> example above.</para></sect2>
  211 </sect1>
  212 <sect1 id="index_1surface_reconstruction_section_case_studies">
  213 <title>Case Studies</title>
  214 <para>The surface reconstruction problem being inherently ill-posed, the proposed algorithm does not pretend to reconstruct all kinds of surfaces with arbitrary sampling conditions. This section provides the user with some hints about the ideal sampling and contouring conditions, and depicts some failure cases when these conditions are not matched.</para><sect2 id="index_1Poisson_surface_reconstruction_3IdealConditions">
  215 <title>Ideal Conditions</title>
  216 <para>The user must keep in mind that the Poisson surface reconstruction algorithm comprises two phases (computing the implicit function from the input point set and contouring an iso-surface of this function). Both require some care in terms of sampling conditions and parameter tuning.</para></sect2>
  217 <sect2 id="index_1Poisson_surface_reconstruction_3PointSet">
  218 <title>Point Set</title>
  219 <para>Ideally the current implementation of the Poisson surface reconstruction method expects a dense 3D oriented point set (typically matching the epsilon-sampling condition <ref refid="citelist_1CITEREF_cgal:bo-pgsms-05" kindref="member">[1]</ref>) and sampled over a closed, smooth surface. Oriented herein means that all 3D points must come with consistently oriented normals to the inferred surface. <ref refid="index_1fig__Poisson_surface_reconstruction_3figbimba" kindref="member">fig__Poisson_surface_reconstruction_3figbimba</ref> and <ref refid="index_1fig__Poisson_surface_reconstruction_3figeros" kindref="member">fig__Poisson_surface_reconstruction_3figeros</ref> illustrate cases where these ideal conditions are met.</para><para><anchor id="index_1fig__Poisson_surface_reconstruction_3figbimba"/><image type="html" name="bimba.jpg"></image>
  220  <image type="latex" name="bimba.jpg" width="15cm"></image>
  221   <ref refid="index_1fig__Poisson_surface_reconstruction_3figbimba" kindref="member">fig__Poisson_surface_reconstruction_3figbimba</ref> Poisson reconstruction. Left: 120K points sampled on a statue (Minolta laser scanner). Right: reconstructed surface mesh. </para><para><anchor id="index_1fig__Poisson_surface_reconstruction_3figeros"/><image type="html" name="eros.jpg"></image>
  222  <image type="latex" name="eros.jpg" width="15cm"></image>
  223   <ref refid="index_1fig__Poisson_surface_reconstruction_3figeros" kindref="member">fig__Poisson_surface_reconstruction_3figeros</ref> Left: 120K points sampled on a statue (Minolta laser scanner). Right: reconstructed surface mesh. </para><para>The algorithm is fairly robust to anisotropic sampling and to noise. It is also robust to missing data through filling the corresponding holes as the algorithm is designed to reconstruct the indicator function of an inferred solid (see <ref refid="index_1fig__Poisson_surface_reconstruction_3figholes_good" kindref="member">fig__Poisson_surface_reconstruction_3figholes_good</ref>).</para><para><anchor id="index_1fig__Poisson_surface_reconstruction_3figholes_good"/><image type="html" name="holes_good.jpg"></image>
  224  <image type="latex" name="holes_good.jpg" width="15cm"></image>
  225   <ref refid="index_1fig__Poisson_surface_reconstruction_3figholes_good" kindref="member">fig__Poisson_surface_reconstruction_3figholes_good</ref> Top left: 65K points sampled on a hand (Kreon laser scanner). Bottom left: the point set is highly anisotropic due to the scanning technology. Right: reconstructed surface mesh and closeup. The holes are properly closed. </para><para>The algorithm is in general not robust to outliers, although a few outliers do not always create a failure, see <ref refid="index_1fig__Poisson_surface_reconstruction_3figoutliers" kindref="member">fig__Poisson_surface_reconstruction_3figoutliers</ref>.</para><para><anchor id="index_1fig__Poisson_surface_reconstruction_3figoutliers"/><image type="html" name="outliers.jpg"></image>
  226  <image type="latex" name="outliers.jpg" width="15cm"></image>
  227   <ref refid="index_1fig__Poisson_surface_reconstruction_3figoutliers" kindref="member">fig__Poisson_surface_reconstruction_3figoutliers</ref> Left: 70K points sampled on an elephant with few outliers emphasized with disks. Right: reconstructed surface mesh. </para><para>The algorithm works well even when the inferred surface is composed of several connected components, provided that both all normals are properly estimated and oriented (the current CGAL normal orienter algorithm may fail in some cases, see <computeroutput><ref refid="group__PkgPointSetProcessing3Algorithms_1ga50c98d5c5ae5535bce6f32eddbd03f33" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Point_set_processing_3.tag">mst_orient_normals()</ref></computeroutput>), and that the final contouring algorithm is properly seeded for each component. When the inferred surface is composed of several nested connected components care should be taken to orient the normals of each component in alternation (inward/outward) so that the final contouring stage picks a proper contouring value.</para></sect2>
  228 <sect2 id="index_1Poisson_surface_reconstruction_3ContouringP">
  229 <title>Contouring Parameters</title>
  230 <para>Our implementation of the Poisson surface reconstruction algorithm computes an implicit function represented as a piecewise linear function over the tetrahedra of a 3D Delaunay triangulation constructed from the input points then refined through Delaunay refinement. For this reason, any iso-surface is also piecewise linear and hence may contain sharp creases. As the contouring algorithm <computeroutput><ref refid="group__PkgSurfaceMesher3FunctionsMakeMesh_1ga7e188adef5bfadaafd08db82c8a25dc1" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">make_surface_mesh()</ref></computeroutput> expects a smooth implicit function these sharp creases may create spurious clusters of vertices in the final reconstructed surface mesh when setting a small mesh sizing or surface approximation error parameter (see <ref refid="index_1fig__Poisson_surface_reconstruction_3figcontouring_bad" kindref="member">fig__Poisson_surface_reconstruction_3figcontouring_bad</ref>).</para><para>One way to avoid these spurious clusters consists of adjusting the mesh sizing and surface approximation parameters large enough compared to the average sampling density (obtained through <computeroutput><ref refid="group__PkgPointSetProcessing3Algorithms_1gaa74cb0739e0d74f495d3a65e7e1b4e7e" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Point_set_processing_3.tag">compute_average_spacing()</ref></computeroutput>) so that the contouring algorithm <emphasis>perceives</emphasis> a smooth iso-surface. We recommend to use the following contouring parameters:</para><para><itemizedlist>
  231 <listitem><para>Max triangle radius: at least 100 times the average spacing.</para></listitem><listitem><para>Approximation distance: at least 0.25 times the average spacing.</para></listitem></itemizedlist>
  232 </para><para><anchor id="index_1fig__Poisson_surface_reconstruction_3figcontouring_bad"/><image type="html" name="contouring_bad.jpg"></image>
  233  <image type="latex" name="contouring_bad.jpg" width="15cm"></image>
  234   <ref refid="index_1fig__Poisson_surface_reconstruction_3figcontouring_bad" kindref="member">fig__Poisson_surface_reconstruction_3figcontouring_bad</ref> Left: surface reconstructed with approximation distance = 0.25 * average spacing. Right: surface reconstructed with approximation distance = 0.15 * average spacing. Notice the spurious cluster on the cheek. </para></sect2>
  235 <sect2 id="index_1Poisson_surface_reconstruction_3DegradedConditions">
  236 <title>Degraded Conditions</title>
  237 <para>The conditions listed above are rather restrictive and in practice not all of them are met in the applications. We now illustrates the behavior of the algorithm when the conditions are not met in terms of sampling, wrongly oriented normals, noise and sharp creases.</para></sect2>
  238 <sect2 id="index_1Poisson_surface_reconstruction_3SparseSampling">
  239 <title>Sparse Sampling</title>
  240 <para>The reconstruction algorithm expects a sufficiently dense point set. Although there is no formal proof of correctness of the algorithm under certain density conditions due to its variational nature, our experiments show that the algorithm reconstructs well all thin features when the local spacing is at most one tenth of the local feature size (the distance to the medial axis, which captures altogether curvature, thickness and separation). When this condition is not met the reconstruction does not reconstruct the thin undersampled features (see <ref refid="index_1fig__Poisson_surface_reconstruction_3figsampling" kindref="member">fig__Poisson_surface_reconstruction_3figsampling</ref>).</para><para><anchor id="index_1fig__Poisson_surface_reconstruction_3figsampling"/><image type="html" name="sampling.jpg"></image>
  241  <image type="latex" name="sampling.jpg" width="15cm"></image>
  242   <ref refid="index_1fig__Poisson_surface_reconstruction_3figsampling" kindref="member">fig__Poisson_surface_reconstruction_3figsampling</ref> Left: 50K points sampled on the Neptune trident. The reconstruction (not shown) is successful in this case. Right: point set simplified to 1K points then reconstructed (all input points are depicted with normals). The thin feature is not reconstructed. </para></sect2>
  243 <sect2 id="index_1Poisson_surface_reconstruction_3LargeHoles">
  244 <title>Large Holes</title>
  245 <para>The reconstruction is devised to solve for an implicit function which is an approximate indicator function of an inferred solid. For this reason the contouring algorithm always extracts a closed surface mesh and hence is able to fill the small holes where data are missing due, e.g., to occlusions during acquisition (see <ref refid="index_1fig__Poisson_surface_reconstruction_3figholes_bad" kindref="member">fig__Poisson_surface_reconstruction_3figholes_bad</ref>).</para><para><anchor id="index_1fig__Poisson_surface_reconstruction_3figholes_bad"/><image type="html" name="holes_bad.jpg"></image>
  246  <image type="latex" name="holes_bad.jpg" width="15cm"></image>
  247   <ref refid="index_1fig__Poisson_surface_reconstruction_3figholes_bad" kindref="member">fig__Poisson_surface_reconstruction_3figholes_bad</ref> Left: 65K points sampled on a hand with no data captured at the wrist base. Right: reconstructed surface mesh. The surface is properly closed on the fingers and also closed at the wrist but in a less plausible manner. </para><para>In case of large holes the algorithm still closes them all but the resulting piecewise linear implicit function may exhibit large triangle patches and sharp creases as the 3D Delaunay triangulation used for solving is very coarse where the holes are filled. This can be avoided by a two pass approach. The first pass for a subset of the points serves to get an approximation of the surface at the holes. This surface then serves to compute a smoother 3D Delaunay triangulation for the second pass with the full set of points.</para><para><anchor id="index_1fig__Poisson_surface_reconstruction_3-fig-two_passes"/><image type="html" name="two-passes.png"></image>
  248  <image type="latex" name="two-passes.png" width="15cm"></image>
  249   <ref refid="index_1fig__Poisson_surface_reconstruction_3-fig-two_passes" kindref="member">fig__Poisson_surface_reconstruction_3-fig-two_passes</ref> Left: The wrist. Middle: one pass. Right: two passes. </para></sect2>
  250 <sect2 id="index_1Poisson_surface_reconstruction_3WronglyOriented">
  251 <title>Wrongly Oriented Normals</title>
  252 <para>The Poisson surface reconstruction approaches solves for an implicit function whose gradient best matches a set of input normals. Because it solves this problem in the least squares sense, it is robust to few isolated wrongly oriented (flipped) normals. Nevertheless a cluster of wrongly oriented normals leads to an incorrect implicit function and hence to spurious geometric or even topological distortion (see <ref refid="index_1fig__Poisson_surface_reconstruction_3figflipped_normals" kindref="member">fig__Poisson_surface_reconstruction_3figflipped_normals</ref>).</para><para><anchor id="index_1fig__Poisson_surface_reconstruction_3figflipped_normals"/><image type="html" name="flipped_normals.jpg"></image>
  253  <image type="latex" name="flipped_normals.jpg" width="15cm"></image>
  254   <ref refid="index_1fig__Poisson_surface_reconstruction_3figflipped_normals" kindref="member">fig__Poisson_surface_reconstruction_3figflipped_normals</ref> Left: points sampled on a sphere with a cluster of wrongly oriented normals. Right: reconstructed surface mesh with a spurious bump. </para></sect2>
  255 <sect2 id="index_1Poisson_surface_reconstruction_3NoiseandOutliers">
  256 <title>Noise and Outliers</title>
  257 <para>A large amount of noise inevitably impacts on the reconstruction (see <ref refid="index_1fig__Poisson_surface_reconstruction_3fignoise" kindref="member">fig__Poisson_surface_reconstruction_3fignoise</ref>, top) and the current implementation does not provide any mean to trade data fitting for smoothness. Nevertheless if the signal-to-noise ratio is sufficiently high and/or the surface approximation and sizing parameters set for contouring the iso-surface is large with respect to the noise level the output surface mesh will appear smooth (not shown). If the user wants to produce a smooth and detailed output surface mesh, we recommend to apply smoothing through <computeroutput><ref refid="group__PkgPointSetProcessing3Algorithms_1ga549402c0a8a8b6b71875181e93961521" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Point_set_processing_3.tag">jet_smooth_point_set()</ref></computeroutput> (see <ref refid="index_1fig__Poisson_surface_reconstruction_3fignoise" kindref="member">fig__Poisson_surface_reconstruction_3fignoise</ref>, bottom).</para><para><anchor id="index_1fig__Poisson_surface_reconstruction_3fignoise"/><image type="html" name="noise.jpg"></image>
  258  <image type="latex" name="noise.jpg" width="15cm"></image>
  259   <ref refid="index_1fig__Poisson_surface_reconstruction_3fignoise" kindref="member">fig__Poisson_surface_reconstruction_3fignoise</ref> Top-left: points sampled on a sphere and corrupted with a lot of noise. Top-right: reconstructed surface mesh. Bottom-left: smoothed point set. Bottom-right: reconstructed surface mesh. </para><para>For a large number of outliers the failure cases (not shown) translate into spurious small connected components and massive distortion near the inferred surface. In this case the outliers must be removed through <computeroutput><ref refid="group__PkgPointSetProcessing3Algorithms_1gafd0b5a21ec5042e4bca09cb43f1847f9" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Point_set_processing_3.tag">remove_outliers()</ref></computeroutput>.</para></sect2>
  260 <sect2 id="index_1Poisson_surface_reconstruction_3SharpCreases">
  261 <title>Sharp Creases</title>
  262 <para>The current reconstruction algorithm is not able to recover the sharp creases and corners present in the inferred surface. This translates into smoothed sharp creases.</para><para><anchor id="index_1fig__Poisson_surface_reconstruction_3figsharp_features"/><image type="html" name="sharp_features.jpg"></image>
  263  <image type="latex" name="sharp_features.jpg" width="15cm"></image>
  264   <ref refid="index_1fig__Poisson_surface_reconstruction_3figsharp_features" kindref="member">fig__Poisson_surface_reconstruction_3figsharp_features</ref> Left: 5K points sampled on a mechanical piece with sharp features (creases, darts and corners). Right: reconstructed surface mesh with smoothed creases. </para></sect2>
  265 </sect1>
  266 <sect1 id="index_1SurfReconstPerformances">
  267 <title>Performances</title>
  268 <para>We provide some performance numbers for scanning data. We measure the Poisson implicit function computation time, the contouring time for a range of approximation distances, the memory occupancy as well as the influence of the point set simplification. The machine used is a PC running Windows 7 64 bits with an Intel CPU Core 2 Duo processor clocked at 2.81 GHz and with 8 GB of RAM. The software is compiled with Visual C++ 2010 (VC9) compiler with the 03 option which maximizes speed. All measurements were done using the <ref refid="thirdparty_1thirdpartyEigen" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Manual.tag">Eigen</ref> library.</para><sect2 id="index_1SurfReconstPerfPIF">
  269 <title>Poisson Implicit Function</title>
  270 <para>The point set chosen for benchmarking the Poisson implicit function is the Bimba con Nastrino point set (1.6 million points) depicted by <ref refid="index_1fig__Poisson_surface_reconstruction_3-fig-contouring_bench" kindref="member">fig__Poisson_surface_reconstruction_3-fig-contouring_bench</ref>. We measure the Poisson implicit function computation (i.e., the call to <computeroutput><ref refid="classCGAL_1_1Poisson__reconstruction__function_1a5b01f27b151690449f33c9eb421f7c97" kindref="member">Poisson_reconstruction_function::compute_implicit_function()</ref></computeroutput> denoted by Poisson solve hereafter) for this point set as well as for simplified versions obtained through random simplification. The following table provides Poisson solve computation times in seconds for an increasing number of points.</para><para><table rows="10" cols="2"><row>
  271 <entry thead="no"><para><hruler/>
  272  </para></entry></row>
  273 <row>
  274 <entry thead="no"><para></para><para>Number of points (x1000) </para></entry><entry thead="no"><para>Poisson solve duration (in s) </para></entry></row>
  275 <row>
  276 <entry thead="no"><para><hruler/>
  277  </para></entry></row>
  278 <row>
  279 <entry thead="no"><para>60 </para></entry><entry thead="no"><para>15 </para></entry></row>
  280 <row>
  281 <entry thead="no"><para>100 </para></entry><entry thead="no"><para>25 </para></entry></row>
  282 <row>
  283 <entry thead="no"><para>250 </para></entry><entry thead="no"><para>96 </para></entry></row>
  284 <row>
  285 <entry thead="no"><para>500 </para></entry><entry thead="no"><para>150 </para></entry></row>
  286 <row>
  287 <entry thead="no"><para>1,000 </para></entry><entry thead="no"><para>249 </para></entry></row>
  288 <row>
  289 <entry thead="no"><para>1,800 </para></entry><entry thead="no"><para>478 </para></entry></row>
  290 <row>
  291 <entry thead="no"><para><hruler/>
  292  </para></entry></row>
  293 </table>
  294 </para></sect2>
  295 <sect2 id="index_1SurfReconstPerfCont">
  296 <title>Contouring</title>
  297 <para>The point set chosen for benchmarking the contouring stage is the Bimba con Nastrino point set simplified to 100k points. We measure the contouring (i.e. the call to <computeroutput><ref refid="group__PkgSurfaceMesher3FunctionsMakeMesh_1ga7e188adef5bfadaafd08db82c8a25dc1" kindref="member" external="/home/cgal-testsuite/cgal_doc_build/CGAL-5.0-I-190/doc/scripts/build_doc/doc_tags/Surface_mesher.tag">make_surface_mesh()</ref></computeroutput>) duration and the reconstruction error for a range of approximation distances. The reconstruction error is expressed as the average distance from input points to the reconstructed surface in mm (the Bimba con Nastrino statue is 324 mm tall).</para><para><table rows="9" cols="3"><row>
  298 <entry thead="no"><para><hruler/>
  299  </para></entry></row>
  300 <row>
  301 <entry thead="no"><para>Approx. distance (*average spacing) </para></entry><entry thead="no"><para>Contouring duration (in s) </para></entry><entry thead="no"><para>Reconstruction error (mm) </para></entry></row>
  302 <row>
  303 <entry thead="no"><para><hruler/>
  304  </para></entry></row>
  305 <row>
  306 <entry thead="no"><para>0.1 </para></entry><entry thead="no"><para>19.2 </para></entry><entry thead="no"><para>0.055 </para></entry></row>
  307 <row>
  308 <entry thead="no"><para>0.25 </para></entry><entry thead="no"><para>6.9 </para></entry><entry thead="no"><para>0.106 </para></entry></row>
  309 <row>
  310 <entry thead="no"><para>0.5 </para></entry><entry thead="no"><para>3.2 </para></entry><entry thead="no"><para>0.18 </para></entry></row>
  311 <row>
  312 <entry thead="no"><para>1 </para></entry><entry thead="no"><para>1.65 </para></entry><entry thead="no"><para>0.36 </para></entry></row>
  313 <row>
  314 <entry thead="no"><para>2 </para></entry><entry thead="no"><para>0.8 </para></entry><entry thead="no"><para>0.76 </para></entry></row>
  315 <row>
  316 <entry thead="no"><para><hruler/>
  317  </para></entry></row>
  318 </table>
  319 </para><para><anchor id="index_1fig__Poisson_surface_reconstruction_3-fig-contouring_bench"/><image type="html" name="contouring_bench.jpg"></image>
  320  <image type="latex" name="contouring_bench.jpg" width="15cm"></image>
  321   <ref refid="index_1fig__Poisson_surface_reconstruction_3-fig-contouring_bench" kindref="member">fig__Poisson_surface_reconstruction_3-fig-contouring_bench</ref> Contouring duration (in s) and reconstruction error (mm) against several approximation distance parameters for the Bimba con Nastrino point set simplified to 100k points. </para></sect2>
  322 <sect2 id="index_1SurfReconstPerfMem">
  323 <title>Memory</title>
  324 <para>We measure the memory occupancy for the reconstruction of the full Bimba con Nastrino point set (1.8 millions points) as well as for simplified versions.<linebreak/>
  325 The Poisson implicit function computation has a memory peak when solving the Poisson linear system using the sparse linear solver.</para><para><table rows="10" cols="2"><row>
  326 <entry thead="no"><para><hruler/>
  327  </para></entry></row>
  328 <row>
  329 <entry thead="no"><para>Number of points (x1000) </para></entry><entry thead="no"><para>Memory occupancy (MBytes) </para></entry></row>
  330 <row>
  331 <entry thead="no"><para><hruler/>
  332  </para></entry></row>
  333 <row>
  334 <entry thead="no"><para>60 </para></entry><entry thead="no"><para>180 </para></entry></row>
  335 <row>
  336 <entry thead="no"><para>100 </para></entry><entry thead="no"><para>270 </para></entry></row>
  337 <row>
  338 <entry thead="no"><para>250 </para></entry><entry thead="no"><para>790 </para></entry></row>
  339 <row>
  340 <entry thead="no"><para>500 </para></entry><entry thead="no"><para>1300 </para></entry></row>
  341 <row>
  342 <entry thead="no"><para>1,000 </para></entry><entry thead="no"><para>2200 </para></entry></row>
  343 <row>
  344 <entry thead="no"><para>1,800 </para></entry><entry thead="no"><para>3800 </para></entry></row>
  345 <row>
  346 <entry thead="no"><para><hruler/>
  347  </para></entry></row>
  348 </table>
  349 </para></sect2>
  350 <sect2 id="index_1SurfReconstPerfPSS">
  351 <title>Point Set Simplification</title>
  352 <para>Due to the memory limitations described above, we recommend to simplify the point sets captured by laser scanners.<linebreak/>
  353 We measure the reconstruction error for the Bimba con Nastrino point set (1.6M points) as well as for simplified versions. All reconstructions use the recommended contouring parameter <computeroutput>approximation distance = 0.25 * the input point</computeroutput> set&apos;s average spacing. The reconstruction error is expressed as the average distance from input points to the reconstructed surface in mm (the Bimba con Nastrino statue is 324 mm tall).</para><para><table rows="11" cols="2"><row>
  354 <entry thead="no"><para><hruler/>
  355  </para></entry></row>
  356 <row>
  357 <entry thead="no"><para>Number of points (x1000) </para></entry><entry thead="no"><para>Reconstruction error (mm) </para></entry></row>
  358 <row>
  359 <entry thead="no"><para><hruler/>
  360  </para></entry></row>
  361 <row>
  362 <entry thead="no"><para>60 </para></entry><entry thead="no"><para>0.27 </para></entry></row>
  363 <row>
  364 <entry thead="no"><para>120 </para></entry><entry thead="no"><para>0.15 </para></entry></row>
  365 <row>
  366 <entry thead="no"><para>250 </para></entry><entry thead="no"><para>0.11 </para></entry></row>
  367 <row>
  368 <entry thead="no"><para>500 </para></entry><entry thead="no"><para>0.079 </para></entry></row>
  369 <row>
  370 <entry thead="no"><para>1,000 </para></entry><entry thead="no"><para>0.066 </para></entry></row>
  371 <row>
  372 <entry thead="no"><para>1,500 </para></entry><entry thead="no"><para>0.061 </para></entry></row>
  373 <row>
  374 <entry thead="no"><para>1,600 </para></entry><entry thead="no"><para>0.06 </para></entry></row>
  375 <row>
  376 <entry thead="no"><para><hruler/>
  377  </para></entry></row>
  378 </table>
  379 </para><para><anchor id="index_1fig__Poisson_surface_reconstruction_3-fig-simplification_bench"/><image type="html" name="simplification_bench.jpg"></image>
  380  <image type="latex" name="simplification_bench.jpg" width="15cm"></image>
  381   <ref refid="index_1fig__Poisson_surface_reconstruction_3-fig-simplification_bench" kindref="member">fig__Poisson_surface_reconstruction_3-fig-simplification_bench</ref> Reconstruction error (mm) against number of points for the Bimba con Nastrino point set with 1.6M points as well as for simplified versions. </para></sect2>
  382 </sect1>
  383 <sect1 id="index_1SurfReconstDesignHistory">
  384 <title>Design and Implementation History</title>
  385 <para>The initial implementation was essentially done by Laurent Saboret, guided by Pierre Alliez and Ga"el Guennebaud. For later releases of the package Andreas Fabri worked on performance improvements, and Laurent Rineau added the two passes for dealing with holes. </para></sect1>
  386     </detaileddescription>
  387   </compounddef>
  388 </doxygen>