Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local feature size for point set processing #8006

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ecd26eb
lfs-v1
bizerfr Jan 22, 2024
c5ce18e
remove comments
bizerfr Jan 29, 2024
ed49e41
cmakelists for lfs_example
bizerfr Jan 29, 2024
772f36f
code style
bizerfr Jan 29, 2024
7240a15
code style-2
bizerfr Jan 29, 2024
bf2c0ed
fixes so that it compiles
afabri Jan 30, 2024
aa9f1cb
Pass property map as parameter
afabri Feb 5, 2024
c885e08
lfs_map v2
bizerfr Feb 5, 2024
7d4d040
reference
bizerfr Feb 5, 2024
9b1788d
doxygen & point_set example
bizerfr Feb 5, 2024
2baa49b
change reference back to copy
bizerfr Feb 5, 2024
f79f71a
put lfs_map in the back
bizerfr Feb 5, 2024
e722097
CGAL::data_file_path(points_3/kitten.xyz
bizerfr Feb 5, 2024
d9d84af
Update Point_set_processing_3/examples/Point_set_processing_3/lfs-exa…
bizerfr Feb 5, 2024
3607da4
Update Point_set_processing_3/examples/Point_set_processing_3/lfs-exa…
bizerfr Feb 5, 2024
b28da76
doxygen
bizerfr Feb 5, 2024
c2afd8c
cmakelists for examples
bizerfr Feb 5, 2024
962d3b1
cmakelists & doxygen
bizerfr Feb 5, 2024
5afb5af
trivial fixes
afabri Feb 5, 2024
4da4046
point_push_map instead of point_map, otherwise, read points will not …
bizerfr Feb 5, 2024
d20626d
Use CGAL::IO::read_point_set()
afabri Feb 6, 2024
2a18b4e
check normals are normalized or not
bizerfr Feb 6, 2024
6b3af0d
fix lfs_example_tuple
bizerfr Feb 6, 2024
d76a894
remove trailing whitespace
bizerfr Feb 6, 2024
e4b0152
remove trailing whitespace
bizerfr Feb 6, 2024
73fffec
remove trailing whitespace
bizerfr Feb 6, 2024
8733f9b
remove trailing whitespace
bizerfr Feb 6, 2024
78499bb
read_point_set() adds the property
afabri Feb 6, 2024
0358747
doc fixes
afabri Feb 6, 2024
8e44202
Update Point_set_processing_3/doc/Point_set_processing_3/Point_set_pr…
bizerfr Feb 6, 2024
3cb7ed6
Update Point_set_processing_3/include/CGAL/estimate_lfs.h
bizerfr Feb 6, 2024
9c7cb50
rename header file
bizerfr Feb 6, 2024
9a8f017
fix doc
bizerfr Feb 6, 2024
793b3a3
smooth
bizerfr Feb 29, 2024
d935d2b
doxygen
bizerfr Feb 29, 2024
7207ebc
test
bizerfr Feb 29, 2024
71ceedc
remove trailing whitespaces
bizerfr Feb 29, 2024
03b3d6c
remove trailing whilespace
bizerfr Feb 29, 2024
a81bfbf
remove trailing whilespace
bizerfr Feb 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,18 @@ The following example reads a point set from a file, estimates the
points that are on sharp edges:
\cgalExample{Point_set_processing_3/edges_example.cpp}

\section Point_set_processing_3LFSEstimation Local Feature Size Estimation

The function `estimate_local_feature_size()` can estimate the local feature size for each point by giving a raw point set.

The function will estimate the curvature and shape diameter. Then, the local feature size will be the minimum of the curvature radius and half of the shape diameter.

\subsection Point_set_processing_3Example_LFS Example

The following example reads a point set from a file, estimates the
local feature size for each point:
\cgalExample{Point_set_processing_3/lfs_example.cpp}


\section Point_set_processing_3Structuring Structuring

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
\example Point_set_processing_3/bilateral_smooth_point_set_example.cpp
\example Point_set_processing_3/edge_aware_upsample_point_set_example.cpp
\example Point_set_processing_3/edges_example.cpp
\example Point_set_processing_3/lfs_example.cpp
\example Point_set_processing_3/structuring_example.cpp
\example Point_set_processing_3/callback_example.cpp
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/estimate_lfs.h>
#include <CGAL/IO/read_points.h>

#include <vector>
#include <utility> // defines std::pair


// types
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
typedef Kernel::FT FT;
typedef Kernel::Point_3 Point;
typedef Kernel::Vector_3 Vector;

// Point with normal vector stored in a std::pair.
typedef std::pair<Point, Vector> Point_with_normal;

// Concurrency
typedef CGAL::Parallel_if_available_tag Concurrency_tag;


int main(void)
{

// read xyz
const std::string filename = "./frog.xyz";

std::vector<Point_with_normal> points;
if(!CGAL::IO::read_points(filename,
std::back_inserter(points),
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<Point_with_normal>())))
{
std::cerr << "Error: cannot read file " << filename<< std::endl;
return EXIT_FAILURE;
}

unsigned int jet_k = 24;
std::size_t N_rays = 60;
FT apex_angle = 30;
std::vector<FT> lfses = CGAL::estimate_local_feature_size<Concurrency_tag>(points, jet_k, N_rays, apex_angle,
CGAL::parameters::point_map(CGAL::First_of_pair_property_map<Point_with_normal>())
.normal_map(CGAL::Second_of_pair_property_map<Point_with_normal>()));

for (const auto &lfs : lfses)
std::cerr << lfs << "\n";


return EXIT_SUCCESS;
}
Loading
Loading