OptoInspect3D Inline - alg3Dlib
3.4.0
Library for measured 3D data processing
|
This module contains functions to align point clouds and triangle meshes. More...
Data Structures | |
struct | icpParam |
ICP input parameters. More... | |
struct | icpMultiViewParam |
MultiView-ICP input parameters. More... | |
struct | icpResult |
ICP result parameters. More... | |
struct | icpMultiViewTransformations |
MultiView-ICP transformations. More... | |
Enumerations | |
enum | icpOptions { icpRXaxis = 1L << 0, icpRYaxis = 1L << 1, icpRZaxis = 1L << 2, icpTXaxis = 1L << 3, icpTYaxis = 1L << 4, icpTZaxis = 1L << 5, icpScaling = 1L << 6, icpStandardDoF = 63, icpAllDoF = 127, icpMatchCoG = 1L << 7, icpOptMiniMax = 1L << 8, icpRotCenterIsOrigin = 1L << 9 } |
ICP option flags. More... | |
Functions | |
int __cdecl | ALG3D_computeRegistration (const ALG3D_Point3d *ptsStat, size_t nStat, const ALG3D_Point3d *ptsDyn, size_t nDyn, icpParam prm, icpResult *res, double R[9], double T[3], double S[1]) |
Computes the registration/alignment of two 3d point clouds. More... | |
int __cdecl | ALG3D_computeRegistrationTree (const ALG3D_KDTREE tree, const ALG3D_Point3d *ptsDyn, size_t nDyn, icpParam prm, icpResult *res, double R[9], double T[3], double S[1]) |
Computes the registration/alignment of two 3d point clouds. More... | |
int __cdecl | ALG3D_computeRegistrationMesh (const ALG3D_MESHTREE meshTree, ALG3D_Point3d *ptsDyn, size_t nDyn, icpParam prm, icpResult *res, double R[9], double T[3], double S[1]) |
Computes the registration/alignment of a3d point clouds to a mesh (e.g. CAD model). More... | |
int __cdecl | ALG3D_computeRegistrationCorrespondences (const ALG3D_Point3d *ptsStat, const ALG3D_Point3d *ptsDyn, size_t numPts, int options, double R[9], double T[3], double S[1]) |
Computes the registration/alignment of two corresponding sets of 3D points. More... | |
int __cdecl | ALG3D_computeRegistrationPlane (const ALG3D_Point3d *ptsStat, const ALG3D_Point3d *normalsStat, size_t nStat, const ALG3D_Point3d *ptsDyn, size_t nDyn, icpParam prm, icpResult *res, double R[9], double T[3], double S[1]) |
Computes the registration/alignment of two 3d point clouds. More... | |
int __cdecl | ALG3D_computeRegistrationPlaneTree (const ALG3D_KDTREE tree, const ALG3D_Point3d *normalsStat, const ALG3D_Point3d *ptsDyn, size_t nDyn, icpParam prm, icpResult *res, double R[9], double T[3], double S[1]) |
Computes the registration/alignment of two 3d point clouds. More... | |
int __cdecl | ALG3D_computeMultiViewRegistration (const ALG3D_Point3d **pointclouds, size_t *pointcloudsSizes, size_t numPointclouds, icpMultiViewParam prm, icpResult *res, icpMultiViewTransformations *transformations) |
Computes the registration/alignment of multiple 3d point clouds. More... | |
This module contains functions to align point clouds and triangle meshes.
This module also provides the functions:
struct icpParam |
ICP input parameters.
struct icpMultiViewParam |
MultiView-ICP input parameters.
struct icpResult |
ICP result parameters.
struct icpMultiViewTransformations |
enum icpOptions |
#include <algorithm.h>
ICP option flags.
int __cdecl ALG3D_computeMultiViewRegistration | ( | const ALG3D_Point3d ** | pointclouds, |
size_t * | pointcloudsSizes, | ||
size_t | numPointclouds, | ||
icpMultiViewParam | prm, | ||
icpResult * | res, | ||
icpMultiViewTransformations * | transformations | ||
) |
#include <algorithm.h>
Computes the registration/alignment of multiple 3d point clouds.
[in] | pointclouds | Array of point cloud pointers (begin of each point cloud) |
[in] | pointcloudsSizes | Array with the sizes of each point cloud |
[in] | numPointclouds | Number of point clouds |
[in] | prm | Set of parameters to configure the algorithm |
[out] | res | Result statistics |
[out] | transformations | Array of result transformations (must be preallocated, size = numPointclouds) |
int ALG3D_computeRegistration | ( | const ALG3D_Point3d * | ptsStat, |
size_t | nStat, | ||
const ALG3D_Point3d * | ptsDyn, | ||
size_t | nDyn, | ||
icpParam | prm, | ||
icpResult * | res, | ||
double | R[9], | ||
double | T[3], | ||
double | S[1] | ||
) |
#include <algorithm.h>
Computes the registration/alignment of two 3d point clouds.
A given 'static' point cloud, i.e. a kdTree, is used as a reference. For the second, 'dynamic' point cloud the translation, rotation and scaling are computed iteratively . The iterations stop when a (local) distance minimum is found, i.e. until there is no change anymore or one of the termination criteria has been reached (min. tolerance, max. iterations).
[in] | ptsStat | pointer to the begin of the static data |
[in] | nStat | number of points in static data |
[in] | ptsDyn | pointer to the begin of the dynamic data |
[in] | nDyn | number of points in dynamic data |
[in] | prm | set of parameters to configure the algorithm |
[out] | res | result statistics |
[out] | R | 3x3 rotation matrix (row-major) |
[out] | T | 3x1 translation matrix (vector) |
[out] | S | 1x1 scaling value |
int ALG3D_computeRegistrationCorrespondences | ( | const ALG3D_Point3d * | ptsStat, |
const ALG3D_Point3d * | ptsDyn, | ||
size_t | numPts, | ||
int | options, | ||
double | R[9], | ||
double | T[3], | ||
double | S[1] | ||
) |
#include <algorithm.h>
Computes the registration/alignment of two corresponding sets of 3D points.
Computes the transformation that aligns the points from the ptsDyn
array with the points from the ptsStat
array. The points represent correspondences (i.e. the first points from ptsStat
corresponds to the first points in ptsDyn
, etc.). Use this function if you already know the correspondences (e.g. the user selected 3 corresponding points in both point clouds). If the correspondences are unknown you have to use the ALG3D_computeRegistration function.
ptsStat
and ptsDyn
need to have the same size and contain at least 3 points.options
are allowed in this function:[in] | ptsStat | pointer to the begin of the static data |
[in] | ptsDyn | pointer to the begin of the dynamic data |
[in] | numPts | number of correspondences |
[in] | options | degrees of freedom flags |
[out] | R | 3x3 rotation matrix (row-major) |
[out] | T | 3x1 translation matrix (vector) |
[out] | S | 1x1 scaling value |
int ALG3D_computeRegistrationMesh | ( | const ALG3D_MESHTREE | meshTree, |
ALG3D_Point3d * | ptsDyn, | ||
size_t | nDyn, | ||
icpParam | prm, | ||
icpResult * | res, | ||
double | R[9], | ||
double | T[3], | ||
double | S[1] | ||
) |
#include <algorithm.h>
Computes the registration/alignment of a3d point clouds to a mesh (e.g. CAD model).
A given mesh, i.e. a CAD model, is used as a reference. For the 'dynamic' point cloud the translation, rotation and scaling are computed iteratively . The iterations stop when a (local) distance minimum is found, i.e. until there is no change anymore or one of the termination criteria has been reached (min. tolerance, max. iterations).
[in] | meshTree | kdTree object containing the mesh |
[in] | ptsDyn | pointer to the begin of the dynamic data |
[in] | nDyn | number of points in dynamic data |
[in] | prm | set of parameters to configure the algorithm |
[out] | res | result statistics |
[out] | R | 3x3 rotation matrix (row-major) |
[out] | T | 3x1 translation matrix (vector) |
[out] | S | 1x1 scaling value |
int ALG3D_computeRegistrationPlane | ( | const ALG3D_Point3d * | ptsStat, |
const ALG3D_Point3d * | normalsStat, | ||
size_t | nStat, | ||
const ALG3D_Point3d * | ptsDyn, | ||
size_t | nDyn, | ||
icpParam | prm, | ||
icpResult * | res, | ||
double | R[9], | ||
double | T[3], | ||
double | S[1] | ||
) |
#include <algorithm.h>
Computes the registration/alignment of two 3d point clouds.
A given 'static' point cloud, i.e. a kdTree, is used as a reference. For the second, 'dynamic' point cloud the translation, rotation and scaling are computed iteratively. The iterations stop when a (local) distance minimum is found, i.e. until there is no change anymore or one of the termination criteria has been reached (min. tolerance, max. iterations).
This algorithm uses the "point-to-plane" metric to compute correspondences between the static and dynamic point cloud. This metric requires the static point cloud to have normal vectors. These must be provided by the user. You can use one of the ALG3D_computeNormalVectors functions to perform this operation or use your own one.
ptsStat
and normalsStat
must correspond to each other (e.g. normalsStat[0] = normal of ptsStat[0] etc.).[in] | ptsStat | pointer to the begin of the static data |
[in] | normalsStat | pointer to the begin of the normal vectors of ptsStat |
[in] | nStat | number of points in static data |
[in] | ptsDyn | pointer to the begin of the dynamic data |
[in] | nDyn | number of points in dynamic data |
[in] | prm | set of parameters to configure the algorithm |
[out] | res | result statistics |
[out] | R | 3x3 rotation matrix (row-major) |
[out] | T | 3x1 translation matrix (vector) |
[out] | S | 1x1 scaling value |
int ALG3D_computeRegistrationPlaneTree | ( | const ALG3D_KDTREE | tree, |
const ALG3D_Point3d * | normalsStat, | ||
const ALG3D_Point3d * | ptsDyn, | ||
size_t | nDyn, | ||
icpParam | prm, | ||
icpResult * | res, | ||
double | R[9], | ||
double | T[3], | ||
double | S[1] | ||
) |
#include <algorithm.h>
Computes the registration/alignment of two 3d point clouds.
A given 'static' point cloud, i.e. a kdTree, is used as a reference. For the second, 'dynamic' point cloud the translation, rotation and scaling are computed iteratively. The iterations stop when a (local) distance minimum is found, i.e. until there is no change anymore or one of the termination criteria has been reached (min. tolerance, max. iterations).
This algorithm uses the "point-to-plane" metric to compute correspondences between the static and dynamic point cloud. This metric requires the static point cloud to have normal vectors. These must be provided by the user. You can use one of the ALG3D_computeNormalVectors functions to perform this operation or use your own one.
normalsStat
must correspond to the points from which tree
was built (e.g. normalsStat[0] = normal of first point of point cloud from which tree
was built etc.).[in] | tree | kdTree object containing the static point set |
[in] | normalsStat | pointer to the begin of the normal vectors of tree |
[in] | ptsDyn | pointer to the begin of the dynamic data |
[in] | nDyn | number of points in dynamic data |
[in] | prm | set of parameters to configure the algorithm |
[out] | res | result statistics |
[out] | R | 3x3 rotation matrix (row-major) |
[out] | T | 3x1 translation matrix (vector) |
[out] | S | 1x1 scaling value |
int ALG3D_computeRegistrationTree | ( | const ALG3D_KDTREE | tree, |
const ALG3D_Point3d * | ptsDyn, | ||
size_t | nDyn, | ||
icpParam | prm, | ||
icpResult * | res, | ||
double | R[9], | ||
double | T[3], | ||
double | S[1] | ||
) |
#include <algorithm.h>
Computes the registration/alignment of two 3d point clouds.
A given 'static' point cloud, i.e. a kdTree, is used as a reference. For the second, 'dynamic' point cloud the translation, rotation and scaling are computed iteratively . The iterations stop when a (local) distance minimum is found, i.e. until there is no change anymore or one of the termination criteria has been reached (min. tolerance, max. iterations).
[in] | tree | kdTree object containing the static point set |
[in] | ptsDyn | pointer to the begin of the dynamic data |
[in] | nDyn | number of points in dynamic data |
[in] | prm | set of parameters to configure the algorithm |
[out] | res | result statistics |
[out] | R | 3x3 rotation matrix (row-major) |
[out] | T | 3x1 translation matrix (vector) |
[out] | S | 1x1 scaling value |