MeshLib C Docs
Loading...
Searching...
No Matches
MRPointCloudFPFH.h File Reference
#include <MRCMisc/exports.h>
#include <stdbool.h>

Go to the source code of this file.

Typedefs

typedef struct MR_Vector_std_array_float_33_MR_VertId MR_Vector_std_array_float_33_MR_VertId
typedef struct MR_expected_MR_Vector_std_array_float_33_MR_VertId_std_string MR_expected_MR_Vector_std_array_float_33_MR_VertId_std_string

Functions

MRC_API MR_expected_MR_Vector_std_array_float_33_MR_VertId_std_string * MR_computeFPFH (const MR_PointCloud *pointCloud, float radius, const MR_std_function_bool_from_float *progress)
 Computes Fast Point Feature Histograms for all valid points of given point cloud, which can be compared to find corresponding points in two clouds independently of their relative position; the descriptors do not change under rigid motions and uniform scaling of the cloud (if radius is scaled as well)
MRC_API MR_VertScalars * MR_computeFPFHUniqueness (const MR_Vector_std_array_float_33_MR_VertId *descriptors, const MR_VertBitSet *points)
 Computes for each of given points how unusual its descriptor is: (d - mu) / sigma, where d is the distance of the point's descriptor from the mean descriptor of all given points, and mu and sigma are the mean and the standard deviation of these distances; positive for descriptors farther from the mean than average, negative for more typical ones; deviations |d - mu| up to 1e-6, which come from float rounding of equal descriptors, give 0 Generated from function MR::computeFPFHUniqueness. Parameter descriptors can not be null. It is a single object. Parameter points can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_VertScalars_Destroy() to free it when you're done using it.
MRC_API MR_VertBitSet * MR_findUniqueFPFHPoints_3 (const MR_Vector_std_array_float_33_MR_VertId *descriptors, const MR_VertBitSet *points, float beta)
 Finds the points with unique descriptors, which are less likely to be matched ambiguously: the points whose distance from the mean descriptor of all given points is outside the interval mu +- beta * sigma, where mu and sigma are the mean and the standard deviation of these distances, i.e. |computeFPFHUniqueness(...)| > beta.
MRC_API MR_expected_MR_VertBitSet_std_string * MR_findUniqueFPFHPoints_4 (const MR_PointCloud *pointCloud, float radius, float beta, const MR_std_function_bool_from_float *progress)
 Computes FPFH descriptors of all valid points of given point cloud and finds the points with unique descriptors among them.
MRC_API MR_expected_std_vector_std_pair_MR_VertId_MR_VertId_std_string * MR_findFPFHMatches (const MR_Vector_std_array_float_33_MR_VertId *srcDescriptors, const MR_VertBitSet *srcPoints, const MR_Vector_std_array_float_33_MR_VertId *tgtDescriptors, const MR_VertBitSet *tgtPoints, const bool *mutual, const MR_std_function_bool_from_float *progress)
 Finds for every source point the target point with the closest descriptor (in Euclidean distance) by comparing all pairs of points, which is fast enough for clouds of several thousand points.

Typedef Documentation

◆ MR_expected_MR_Vector_std_array_float_33_MR_VertId_std_string

Stores either a MR::Vector<std::array<float, 33>, MR::VertId> that represents success or a std::string that represents an error. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

◆ MR_Vector_std_array_float_33_MR_VertId

Vector<T> is indexed by size_t Generated from class MR::Vector<std::array<float, 33>, MR::VertId>. Supported MR_PassBy modes: MR_PassBy_DefaultConstruct, MR_PassBy_Copy, MR_PassBy_Move (and MR_PassBy_DefaultArgument and MR_PassBy_NoObject if supported by the callee).

Function Documentation

◆ MR_computeFPFH()

MRC_API MR_expected_MR_Vector_std_array_float_33_MR_VertId_std_string * MR_computeFPFH ( const MR_PointCloud * pointCloud,
float radius,
const MR_std_function_bool_from_float * progress )

Computes Fast Point Feature Histograms for all valid points of given point cloud, which can be compared to find corresponding points in two clouds independently of their relative position; the descriptors do not change under rigid motions and uniform scaling of the cloud (if radius is scaled as well)

Parameters
radiusof neighborhood to consider, usually about 5 times larger than the distance between neighbour points
Returns
error if the cloud has no normals or progress returned false; the normals must be oriented consistently, e.g. by makeOrientedNormals(...) Generated from function MR::computeFPFH. Parameter pointCloud can not be null. It is a single object. Parameter progress is a single object. Parameter progress has a default argument: {}, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_MR_Vector_std_array_float_33_MR_VertId_std_string_Destroy() to free it when you're done using it.

◆ MR_computeFPFHUniqueness()

MRC_API MR_VertScalars * MR_computeFPFHUniqueness ( const MR_Vector_std_array_float_33_MR_VertId * descriptors,
const MR_VertBitSet * points )

Computes for each of given points how unusual its descriptor is: (d - mu) / sigma, where d is the distance of the point's descriptor from the mean descriptor of all given points, and mu and sigma are the mean and the standard deviation of these distances; positive for descriptors farther from the mean than average, negative for more typical ones; deviations |d - mu| up to 1e-6, which come from float rounding of equal descriptors, give 0 Generated from function MR::computeFPFHUniqueness. Parameter descriptors can not be null. It is a single object. Parameter points can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_VertScalars_Destroy() to free it when you're done using it.

◆ MR_findFPFHMatches()

MRC_API MR_expected_std_vector_std_pair_MR_VertId_MR_VertId_std_string * MR_findFPFHMatches ( const MR_Vector_std_array_float_33_MR_VertId * srcDescriptors,
const MR_VertBitSet * srcPoints,
const MR_Vector_std_array_float_33_MR_VertId * tgtDescriptors,
const MR_VertBitSet * tgtPoints,
const bool * mutual,
const MR_std_function_bool_from_float * progress )

Finds for every source point the target point with the closest descriptor (in Euclidean distance) by comparing all pairs of points, which is fast enough for clouds of several thousand points.

Parameters
mutualif true, keeps only the pairs where the source point is also the closest one to the target point
Returns
(source point, target point) pairs ordered by source point, or error if progress returned false Generated from function MR::findFPFHMatches. Parameter srcDescriptors can not be null. It is a single object. Parameter srcPoints can not be null. It is a single object. Parameter tgtDescriptors can not be null. It is a single object. Parameter tgtPoints can not be null. It is a single object. Parameter mutual has a default argument: true, pass a null pointer to use it. Parameter progress is a single object. Parameter progress has a default argument: {}, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_std_vector_std_pair_MR_VertId_MR_VertId_std_string_Destroy() to free it when you're done using it.

◆ MR_findUniqueFPFHPoints_3()

MRC_API MR_VertBitSet * MR_findUniqueFPFHPoints_3 ( const MR_Vector_std_array_float_33_MR_VertId * descriptors,
const MR_VertBitSet * points,
float beta )

Finds the points with unique descriptors, which are less likely to be matched ambiguously: the points whose distance from the mean descriptor of all given points is outside the interval mu +- beta * sigma, where mu and sigma are the mean and the standard deviation of these distances, i.e. |computeFPFHUniqueness(...)| > beta.

Parameters
betathe half-width of the interval in standard deviations, non-negative, usually 1..2 Generated from function MR::findUniqueFPFHPoints. Parameter descriptors can not be null. It is a single object. Parameter points can not be null. It is a single object. Never returns null. Returns an instance allocated on the heap! Must call MR_VertBitSet_Destroy() to free it when you're done using it.

◆ MR_findUniqueFPFHPoints_4()

MRC_API MR_expected_MR_VertBitSet_std_string * MR_findUniqueFPFHPoints_4 ( const MR_PointCloud * pointCloud,
float radius,
float beta,
const MR_std_function_bool_from_float * progress )

Computes FPFH descriptors of all valid points of given point cloud and finds the points with unique descriptors among them.

Parameters
radiusof neighborhood to consider in computeFPFH(...)
betathe half-width of the interval in standard deviations in findUniqueFPFHPoints(...), usually 1..2 Generated from function MR::findUniqueFPFHPoints. Parameter pointCloud can not be null. It is a single object. Parameter progress is a single object. Parameter progress has a default argument: {}, pass a null pointer to use it. Never returns null. Returns an instance allocated on the heap! Must call MR_expected_MR_VertBitSet_std_string_Destroy() to free it when you're done using it.