#include <MRICP.h>
Public Member Functions | |
ICP (const MeshOrPoints &flt, const MeshOrPoints &ref, const AffineXf3f &fltXf, const AffineXf3f &refXf, const VertBitSet &fltSamples={}, const VertBitSet &refSamples={}) | |
MRMESH_API | ICP (const MeshOrPointsXf &flt, const MeshOrPointsXf &ref, const VertBitSet &fltSamples={}, const VertBitSet &refSamples={}) |
MRMESH_API | ICP (const MeshOrPoints &flt, const MeshOrPoints &ref, const AffineXf3f &fltXf, const AffineXf3f &refXf, float samplingVoxelSize) |
MRMESH_API | ICP (const MeshOrPointsXf &flt, const MeshOrPointsXf &ref, float samplingVoxelSize) |
void | setParams (const ICPProperties &prop) |
tune algorithm params before run calculateTransformation() | |
MRMESH_API void | setCosineLimit (const float cos) |
MRMESH_API void | setDistanceLimit (const float dist) |
MRMESH_API void | setBadIterCount (const int iter) |
MRMESH_API void | setFarDistFactor (const float factor) |
MRMESH_API void | setFltSamples (const VertBitSet &fltSamples) |
select pairs with origin samples on floating object | |
MRMESH_API void | sampleFltPoints (float samplingVoxelSize) |
MRMESH_API void | setRefSamples (const VertBitSet &refSamples) |
select pairs with origin samples on reference object | |
MRMESH_API void | sampleRefPoints (float samplingVoxelSize) |
void | samplePoints (float samplingVoxelSize) |
select pairs with origin samples on both objects | |
void | recomputeBitSet (float fltSamplingVoxelSize) |
MRMESH_API void | setXfs (const AffineXf3f &fltXf, const AffineXf3f &refXf) |
sets to-world transformations both for floating and reference objects | |
MRMESH_API void | setFloatXf (const AffineXf3f &fltXf) |
sets to-world transformation for the floating object | |
MRMESH_API AffineXf3f | autoSelectFloatXf () |
MRMESH_API void | updatePointPairs () |
recompute point pairs after manual change of transformations or parameters | |
const ICPProperties & | getParams () const |
MRMESH_API std::string | getStatusInfo () const |
size_t | getNumSamples () const |
computes the number of samples able to form pairs | |
size_t | getNumActivePairs () const |
computes the number of active point pairs | |
MRMESH_API float | getMeanSqDistToPoint () const |
computes root-mean-square deviation between points | |
MRMESH_API float | getMeanSqDistToPlane () const |
computes root-mean-square deviation from points to target planes | |
const PointPairs & | getFlt2RefPairs () const |
returns current pairs formed from samples on floating object and projections on reference object | |
const PointPairs & | getRef2FltPairs () const |
returns current pairs formed from samples on reference object and projections on floating object | |
MRMESH_API AffineXf3f | calculateTransformation () |
This class allows you to register two object with similar shape using Iterative Closest Points (ICP) point-to-point or point-to-plane algorithms
|
inline |
Constructs ICP framework with given sample points on both objects
flt | floating object |
ref | reference object |
fltXf | transformation from floating object space to global space |
refXf | transformation from reference object space to global space |
fltSamples | samples on floating object to find projections on the reference object during the algorithm |
refSamples | samples on reference object to find projections on the floating object during the algorithm |
MRMESH_API MR::ICP::ICP | ( | const MeshOrPointsXf & | flt, |
const MeshOrPointsXf & | ref, | ||
const VertBitSet & | fltSamples = {}, | ||
const VertBitSet & | refSamples = {} ) |
|
inline |
Constructs ICP framework with automatic points sampling on both objects
flt | floating object |
ref | reference object |
fltXf | transformation from floating object space to global space |
refXf | transformation from reference object space to global space |
samplingVoxelSize | approximate distance between samples on each of two objects |
MRMESH_API MR::ICP::ICP | ( | const MeshOrPointsXf & | flt, |
const MeshOrPointsXf & | ref, | ||
float | samplingVoxelSize ) |
MRMESH_API AffineXf3f MR::ICP::autoSelectFloatXf | ( | ) |
automatically selects initial transformation for the floating object based on covariance matrices of both floating and reference objects; applies the transformation to the floating object and returns it
|
nodiscard |
runs ICP algorithm given input objects, transformations, and parameters;
|
inlinenodiscard |
returns current pairs formed from samples on floating object and projections on reference object
|
nodiscard |
computes root-mean-square deviation from points to target planes
|
nodiscard |
computes root-mean-square deviation between points
|
inlinenodiscard |
computes the number of active point pairs
|
inlinenodiscard |
computes the number of samples able to form pairs
|
inlinenodiscard |
|
inlinenodiscard |
returns current pairs formed from samples on reference object and projections on floating object
|
nodiscard |
|
inline |
MRMESH_API void MR::ICP::sampleFltPoints | ( | float | samplingVoxelSize | ) |
|
inline |
select pairs with origin samples on both objects
MRMESH_API void MR::ICP::sampleRefPoints | ( | float | samplingVoxelSize | ) |
MRMESH_API void MR::ICP::setBadIterCount | ( | const int | iter | ) |
MRMESH_API void MR::ICP::setCosineLimit | ( | const float | cos | ) |
MRMESH_API void MR::ICP::setDistanceLimit | ( | const float | dist | ) |
MRMESH_API void MR::ICP::setFarDistFactor | ( | const float | factor | ) |
MRMESH_API void MR::ICP::setFloatXf | ( | const AffineXf3f & | fltXf | ) |
sets to-world transformation for the floating object
MRMESH_API void MR::ICP::setFltSamples | ( | const VertBitSet & | fltSamples | ) |
select pairs with origin samples on floating object
|
inline |
tune algorithm params before run calculateTransformation()
MRMESH_API void MR::ICP::setRefSamples | ( | const VertBitSet & | refSamples | ) |
select pairs with origin samples on reference object
MRMESH_API void MR::ICP::setXfs | ( | const AffineXf3f & | fltXf, |
const AffineXf3f & | refXf ) |
sets to-world transformations both for floating and reference objects
MRMESH_API void MR::ICP::updatePointPairs | ( | ) |
recompute point pairs after manual change of transformations or parameters