Easy3D 2.5.3
|
Extract primitives from point clouds using RANSAC.Usage example: More...
#include <easy3d/algo/point_cloud_ransac.h>
Classes | |
struct | CylinderPrim |
struct | PlanePrim |
Public Types | |
enum | PrimType { PLANE = 0 , SPHERE = 1 , CYLINDER = 2 , CONE = 3 , TORUS = 4 , UNKNOWN = -1 } |
Public Member Functions | |
void | add_primitive_type (PrimType t) |
Setup the primitive types to be extracted. More... | |
void | remove_primitive_type (PrimType t) |
Exclude a primitive types to be extracted. More... | |
int | detect (PointCloud *cloud, unsigned int min_support=1000, float dist_threshold=0.005f, float bitmap_resolution=0.02f, float normal_threshold=0.8f, float overlook_probability=0.001f) |
Extract primitives from a point cloud. More... | |
int | detect (PointCloud *cloud, const std::vector< int > &vertices, unsigned int min_support=1000, float dist_threshold=0.005f, float bitmap_resolution=0.02f, float normal_threshold=0.8f, float overlook_probability=0.001f) |
Extract primitives from a subset of a point cloud.. More... | |
const std::vector< PlanePrim > & | get_planes () const |
const std::vector< CylinderPrim > & | get_cylinders () const |
Extract primitives from point clouds using RANSAC.
Usage example:
void add_primitive_type | ( | PrimType | t | ) |
Setup the primitive types to be extracted.
This is done by adding the interested primitive types one by one.
int detect | ( | PointCloud * | cloud, |
const std::vector< int > & | vertices, | ||
unsigned int | min_support = 1000 , |
||
float | dist_threshold = 0.005f , |
||
float | bitmap_resolution = 0.02f , |
||
float | normal_threshold = 0.8f , |
||
float | overlook_probability = 0.001f |
||
) |
Extract primitives from a subset of a point cloud..
The extracted primitives are stored as properties:
cloud | The input point cloud. |
vertices | The indices of the subset of the input point cloud. |
min_support | The minimal number of points required for a primitive. |
dist_threshold | The distance threshold, defined relative to the bounding box's max dimension. |
bitmap_resolution | The bitmap resolution, defined relative to the bounding box width. |
normal_threshold | The cosine of the maximal normal deviation. |
overlook_probability | The probability with which a primitive is overlooked. |
int detect | ( | PointCloud * | cloud, |
unsigned int | min_support = 1000 , |
||
float | dist_threshold = 0.005f , |
||
float | bitmap_resolution = 0.02f , |
||
float | normal_threshold = 0.8f , |
||
float | overlook_probability = 0.001f |
||
) |
Extract primitives from a point cloud.
The extracted primitives are stored as properties:
cloud | The input point cloud. |
min_support | The minimal number of points required for a primitive. |
dist_threshold | The distance threshold, defined relative to the bounding box's max dimension. |
bitmap_resolution | The bitmap resolution, defined relative to the bounding box width. |
normal_threshold | The cosine of the maximal normal deviation. |
overlook_probability | The probability with which a primitive is overlooked. |
void remove_primitive_type | ( | PrimType | t | ) |
Exclude a primitive types to be extracted.
This is done by removing the primitive type from the existing list.