Subject: CGAL users discussion list
List archive
- From: williamlai3a <>
- To:
- Subject: [cgal-discuss] CGAL::write_xyz_point_set precision and normal problem
- Date: Thu, 8 Feb 2018 19:41:18 -0700 (MST)
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=None ; spf=Pass
- Ironport-phdr: 9a23:g9c3KhJCVaM5H40HzdmcpTZWNBhigK39O0sv0rFitYgRKfzxwZ3uMQTl6Ol3ixeRBMOHs6sC07KempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffxhEiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QLYpUjqg8qhrUgflhikHOTAn82/Zl8N/g75Urh+6uxxywZLYbJ2JOPZiYK/Qe84RS2pbXsZWUixMGo29b4oLD+oFPOZXtYz9p18Uohu/CwSjHv7kxzhMhnDswaE2z/gtHRzI3Aw9BN8Brm7YrNPpNKcPS+y60rTHzSjZY/NN1jfw8Y7FeQ0vr/GLWLJ/a8vRyU83GgPDlFqfspfqPzeL2egXr2eb6O9gWOSygGAkswF8uiWjy8YyhoXTmI4Yyl7J+T9kzIs7K9C0Ukx2bcCiHZBNrS+VLZF2TdknQ2xwuCY11LkGuZmjcSgMx5kr3RjfZOacfIeT5hLsSvydLit/hHJgYL6/hhCy/la8yuDkS8W50UhGojBbntTMuH0BzQHf58aJR/dn/Eqtxy6D1wXJ5eFFJUA0m7DbK5kkwrMokpocq1jPEjPqlEnrgq+Wa14p9fay5+ThfrXmu4WQOJFphQHjKKgugcO/DfwiMgcSR2ib5fi81Lr78ELlT7VFlPk2nrDEv5DbPsQUurO5AxRO0os48Ba+DzKm0MwCknUdLVJFfgiHj4nzNF3ULvD4F6T3v1P5mzhiw7XKP6bqH47WBnnFirboO7hnuGBGzw9m0tFb45NdD7UIIan6Ehv1vYSAVkY3LiS5heD7FZNw2p5YQm3ZUfzRC7/brVLdvrFnGOKLfoJA4G+sechg3ObniDoCoXFYeKCo2ZUNb3XhQqZrZUOFfDzhjspHCmhY5lNiHtyvs0WLVHtoX1j3R7g1v21pBcSgEZqFS4ywxqeOjn/iQ89mI1teA1XJKk/GMoWJX/BVNXCUfolnmzYOUbXnQIgkh0ij
Hi All,
I am a newbie to CGAL, I am trying code from CGAL github master build
(v4.12) to do 3D point set processing.
I am using the following:
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::FT FT;
typedef Kernel::Point_3 Point;
typedef Kernel::Vector_3 Vector;
typedef CGAL::Point_set_3<Point> Point_set;
However, in my original .xyz point cloud, I am having high precision like:
841293.765978 818818.600281 90.933151
841293.765000 818818.599880 90.906294
841293.764292 818818.599046 90.960005
841284.839693 818813.763807 90.725665
841284.822854 818813.767425 90.684145
841284.822320 818813.766970 90.696840
841284.821787 818813.766515 90.709534
841284.825319 818813.768227 90.721745
After processing normal, and I write back the points to a .xyz, the point
precision becomes:
841294 818819 90.9332 0 0 0
841294 818819 90.9063 0 0 0
841294 818819 90.96 0 0 0
841285 818814 90.7257 0 0 0
841285 818814 90.6841 0 0 0
841285 818814 90.6968 0 0 0
841285 818814 90.7095 0 0 0
841285 818814 90.7217 0 0 0
Problem 1:
Seems to me that the output is being trimmed to 6 significant figure.
Are there any ways to output much higher significant figure, say 12?
Problem 2:
In my normal reconstruction processing, I am trying to use the following:
// Computes average spacing.
const unsigned int nb_neighbors = 6; // 1 ring
FT average_spacing = CGAL::compute_average_spacing<Concurrency_tag>(
point_sets, // CGAL::Point_set_3<Point>
nb_neighbors,
CGAL::parameters::point_map(point_sets.point_map())
);
point_sets.add_normal_map();
CGAL::vcm_estimate_normals(
point_sets,
CGAL::to_double(average_spacing)*20,
CGAL::to_double(average_spacing),
CGAL::parameters::point_map(point_sets.point_map()).
normal_map(point_sets.normal_map())
);
Point_set::iterator unoriented_points_begin =
CGAL::mst_orient_normals(point_sets,
nb_neighbors,
CGAL::parameters::point_map(point_sets.point_map()).
normal_map(point_sets.normal_map())
);
// Optional: delete points with an unoriented normal
// if you plan to call a reconstruction algorithm that expects
oriented normals.
point_sets.remove(unoriented_points_begin, point_sets.end());
point_sets.collect_garbage();
As you can see from the above output, all normals are <0 0 0>
However, my point cloud contains a lot of planar surfaces with different
orientation.
Are there any things wrong with my code? Parameter problem? or I am doing in
a wrong concept way.
Thank you very much in advance for any suggestions and recommendation.
Best regards,
William
--
Sent from: http://cgal-discuss.949826.n4.nabble.com/
- [cgal-discuss] CGAL::write_xyz_point_set precision and normal problem, williamlai3a, 02/09/2018
- Re: [cgal-discuss] CGAL::write_xyz_point_set precision and normal problem, Sebastien Loriot (GeometryFactory), 02/09/2018
- Re: [cgal-discuss] CGAL::write_xyz_point_set precision and normal problem, Andreas Fabri, 02/09/2018
- Re: [cgal-discuss] CGAL::write_xyz_point_set precision and normal problem, williamlai3a, 02/12/2018
- Re: [cgal-discuss] CGAL::write_xyz_point_set precision and normal problem, williamlai3a, 02/12/2018
- Re: [cgal-discuss] CGAL::write_xyz_point_set precision and normal problem, Simon Giraudot, 02/12/2018
- Re: [cgal-discuss] CGAL::write_xyz_point_set precision and normal problem, williamlai3a, 02/20/2018
- Re: [cgal-discuss] CGAL::write_xyz_point_set precision and normal problem, Simon Giraudot, 02/12/2018
- Re: [cgal-discuss] CGAL::write_xyz_point_set precision and normal problem, williamlai3a, 02/12/2018
- Re: [cgal-discuss] CGAL::write_xyz_point_set precision and normal problem, Sebastien Loriot (GeometryFactory), 02/09/2018
Archive powered by MHonArc 2.6.18.