RSMesh 1.0.0
一个曲面重构的系统,输入为点云,输出为obj,stl等主流格式的网格文件,使用的方法为径向基函数插值,采取了并行优化、Intel-MKL等优化措施,支持百万级别的点云
载入中...
搜索中...
未找到
normal_estimator.h
1//
2// Created by RainSure on 2023/11/3.
3//
4
5#ifndef RSMESH_NORMAL_ESTIMATOR_H
6#define RSMESH_NORMAL_ESTIMATOR_H
7
8#include <vector>
9#include "Eigen/Core"
10
11#include "geometry/point3d.h"
12#include "point_cloud/kdtree.h"
13#include "types.h"
14
15namespace rsmesh {
16 namespace point_cloud {
17
19 public:
20 explicit normal_estimator(const geometry::points3d& points);
21
22 normal_estimator& estimate_with_knn(index_t k, double plane_factor_threshold = 1.8);
23
24 normal_estimator& estimate_with_knn(const std::vector<index_t>& ks,
25 double plane_factor_threshold = 1.8);
26
27 normal_estimator& estimate_with_radius(double radius, double plane_factor_threshold = 1.8);
28
29 geometry::vectors3d orient_by_outward_vector(const geometry::vector3d& v);
30
31 geometry::vectors3d orient_closed_surface(index_t k);
32
33 private:
34
35 const index_t n_points_;
36 const geometry::points3d points_;
37 kdtree tree_;
38
39 geometry::vectors3d normals_;
40 };
41
42 } // rsmesh
43} // point_cloud
44
45#endif //RSMESH_NORMAL_ESTIMATOR_H
用于在点云中搜索最近邻点的kdtree,利用flann库来进行实现
Definition kdtree.h:22
Eigen::Matrix< double, Eigen::Dynamic, 3, Eigen::RowMajor > vectors3d
3维向量的集合
Definition point3d.h:44
vectors3d points3d
3维点的集合
Definition point3d.h:48
Eigen::RowVector3d vector3d
3维向量
Definition point3d.h:30
本系统的主命名空间,包含了common, examples, fmm, geometry, numeric, point_cloud等子命名空间