MeshLib
 
Loading...
Searching...
No Matches
MRICP.h File Reference
#include "MRMeshOrPoints.h"
#include "MRMatrix3.h"
#include "MRId.h"
#include "MRConstants.h"
#include "MRAffineXf.h"
#include "MRBitSet.h"
#include <cfloat>

Go to the source code of this file.

Classes

struct  MR::ICPPairData
 
struct  MR::PointPair
 Stores a pair of points: one samples on the source and the closest to it on the target. More...
 
struct  MR::IPointPairs
 Simple interface for pairs holder. More...
 
struct  MR::PointPairs
 
struct  MR::NumSum
 
struct  MR::ICPProperties
 
class  MR::ICP
 

Namespaces

namespace  MR
 

Enumerations

enum class  MR::ICPMethod { MR::Combined = 0 , MR::PointToPoint = 1 , MR::PointToPlane = 2 }
 The method how to update transformation from point pairs. More...
 
enum class  MR::ICPMode {
  MR::RigidScale , MR::AnyRigidXf , MR::OrthogonalAxis , MR::FixedAxis ,
  MR::TranslationOnly
}
 The group of transformations, each with its own degrees of freedom. More...
 
enum class  MR::ICPExitType {
  MR::NotStarted , MR::NotFoundSolution , MR::MaxIterations , MR::MaxBadIterations ,
  MR::StopMsdReached
}
 

Functions

size_t MR::getNumSamples (const IPointPairs &pairs)
 returns the number of samples able to form pairs
 
MRMESH_API size_t MR::getNumActivePairs (const IPointPairs &pairs)
 computes the number of active pairs
 
MRMESH_API NumSum MR::getSumSqDistToPoint (const IPointPairs &pairs, double *inaccuracy=nullptr)
 
MRMESH_API NumSum MR::getSumSqDistToPlane (const IPointPairs &pairs, double *inaccuracy=nullptr)
 
float MR::getMeanSqDistToPoint (const IPointPairs &pairs)
 computes root-mean-square deviation between points
 
float MR::getMeanSqDistToPlane (const IPointPairs &pairs)
 computes root-mean-square deviation from points to target planes
 
MRMESH_API std::string MR::getICPStatusInfo (int iterations, ICPExitType exitType)
 returns status info string
 
MRMESH_API AffineXf3f MR::getAligningXf (const PointToPlaneAligningTransform &p2pl, ICPMode mode, float angleLimit, float scaleLimit, const Vector3f &fixedRotationAxis)
 given prepared (p2pl) object, finds the best transformation from it of given type with given limitations on rotation angle and global scale
 
MRMESH_API size_t MR::deactivateFarPairs (IPointPairs &pairs, float maxDistSq)
 reset active bit if pair distance is further than maxDistSq
 
MRMESH_API void MR::updatePointPairs (PointPairs &pairs, const MeshOrPointsXf &src, const MeshOrPointsXf &tgt, float cosTreshold, float distThresholdSq, bool mutualClosest)
 in each pair updates the target data and performs basic filtering (activation)