|
Ponca
7d8ac87a7de01d881c9fde3c42e397b44bffb901
Point Cloud Analysis library
|
Ponca is designed to be lightweight and easy to integrate in existing code bases. To achieve this goal:
Hence, we expect client code to define how point data can be accessed. The minimal API required to use Ponca:
Dim defining the number of dimensions of the ambient space (3 for 3d point clouds)Scalar and VectorType that will be used by the library to represent scalars and vectors.pos()A example respecting those minimal API is:
PONCA_MULTIARCH macro allows for custom datastructure to be used within GPU environment. See: Cuda for more information about GPU computation.Depending on the use cases, other types (e.g. MatrixType) or accessors (normal()) might be required.
There is no notion of Pointsets in Ponca. Most methods can work by providing individual points. For convenience, some functions offer utilities when iterating over collections of points is necessary. In these cases, only iterators (or indices within a container) are required. While this design is compatible with any data structure, using a contiguous container is recommended for optimal performance.
Ponca still provides some basic points structure that follow the minimal API described above relying on Eigen storage. Those structures can be found under the header <Ponca/Common>.
| Class | Capabilities | Example Usage |
|---|---|---|
| PointPosition | Provides position | PointPosition<float, 3> pt({1, 2, 3}); |
| PointPositionNormal | Provides position and normal | PointPositionNormal<float, 3> pt({1, 2, 3}, {1, 0, 0}); |
| PointPositionNormalBinding | Provides position and normal from a linear 1D Scalar array | See Ponca data-structure binding |
| PointPositionNormalLazyBinding | Similar to PointPositionNormalBinding, but only convert data to eigen when needed | See Ponca data-structure binding |
The library also provides a few utilities to generate (noisy) points on simple geometrical object. All function expect the Point structure to provide both poisitions and normals.
| Function | Documentation |
|---|---|
| getRandomPoint | Generate a random noisy point on the unit sphere. |
| getPointOnSphere | Generate points on a sphere. |
| getPointOnCircle | Generate points on a circle. Only x/y coordinates are filled. |
| getPointOnPlane | Generate points on a plane |
| getPointOnParaboloid | Generate a point on a paraboloid. Only works for 3D points. |