CGAL calculates point cloud average spacing

1. Introduction

The idea is very simple, first get the nearest kpoint of each point in the point cloud, then calculate the average distance from the point to its nearest point, accumulate the average distance of each point, and finally divide by the number of points to get Point cloud average spacing.

Two, implement the code

#include <CGAL/Simple_cartesian.h>
#include <CGAL/edge_aware_upsample_point_set.h>

#inc

Guess you like

Origin blog.csdn.net/dayuhaitang1/article/details/130913901