Skip to content

ppf_match_3d_ICP

surface_matchingclassOpenCV 5.0.0
import { ppf_match_3d_ICP } from '@banou/opencv-wasm'

Use after await initOpenCV(). See the initialization and named imports guide.

Native object: release it with using or delete(). Factories can return null; check before calling methods.

This class implements a very efficient and robust variant of the iterative closest point (ICP) algorithm. The task is to register a 3D model (or point cloud) against a set of noisy target data. The variants are put together by myself after certain tests. The task is to be able to match partial, noisy point clouds in cluttered scenes, quickly. You will find that my emphasis is on the performance, while retaining the accuracy. This implementation is based on Tolga Birdal's MATLAB implementation in here: http://www.mathworks.com/matlabcentral/fileexchange/47152-icp-registration-using-efficient-variants-and-multi-resolution-scheme The main contributions come from:

  1. Picky ICP: http://www5.informatik.uni-erlangen.de/Forschung/Publikationen/2003/Zinsser03-ARI.pdf
  2. Efficient variants of the ICP Algorithm: http://docs.happycoders.org/orgadoc/graphics/imaging/fasticp_paper.pdf
  3. Geometrically Stable Sampling for the ICP Algorithm: https://graphics.stanford.edu/papers/stabicp/stabicp.pdf
  4. Multi-resolution registration: http://www.cvl.iis.u-tokyo.ac.jp/~oishi/Papers/Alignment/Jost_MultiResolutionICP_3DIM03.pdf
  5. Linearization of Point-to-Plane metric by Kok Lim Low: https://www.comp.nus.edu.sg/~lowkl/publications/lowk_point-to-plane_icp_techrep.pdf

Constructors and members

static new

ICP constructor with default arguments.

new(iterations: number, tolerence: number, rejectionScale: number, numLevels: number, sampleType: number, numMaxCorr: number): ppf_match_3d_ICP;
7 available overloads
new(): ppf_match_3d_ICP;
new(_0: number): ppf_match_3d_ICP;
new(_0: number, _1: number): ppf_match_3d_ICP;
new(_0: number, _1: number, _2: number): ppf_match_3d_ICP;
new(iterations: number, tolerence: number, rejectionScale: number, numLevels: number): ppf_match_3d_ICP;
new(iterations: number, tolerence: number, rejectionScale: number, numLevels: number, sampleType: number): ppf_match_3d_ICP;
new(iterations: number, tolerence: number, rejectionScale: number, numLevels: number, sampleType: number, numMaxCorr: number): ppf_match_3d_ICP;
_0

0 argument (number).

_1

1 argument (number).

_2

2 argument (number).

iterations

param: [in] tolerence Controls the accuracy of registration at each iteration of ICP.

tolerence

tolerence argument (number).

rejectionScale

Robust outlier rejection is applied for robustness. This value actually corresponds to the standard deviation coefficient. Points with rejectionScale * &sigma are ignored during registration.

numLevels

Number of pyramid levels to proceed. Deep pyramids increase speed but decrease accuracy. Too coarse pyramids might have computational overhead on top of the inaccurate registrtaion. This parameter should be chosen to optimize a balance. Typical values range from 4 to 10.

sampleType

Currently this parameter is ignored and only uniform sampling is applied. Leave it as 0.

numMaxCorr

Currently this parameter is ignored and only PickyICP is applied. Leave it as 1.

Returns

The ppf_match_3d_ICP result.

clone

Create another handle to the same native object. This retains the object without copying its pixels or algorithm state; dispose both handles separately.

clone(): this;
Returns

The this result.

registerModelToScene

Perform registration with multiple initial poses

registerModelToScene(srcPC: Mat, dstPC: Mat): ppf_match_3d_ICP_registerModelToSceneResult;
srcPC

The input point cloud for the model. Expected to have the normals (Nx6). Currently, CV_32F is the only supported data type.

dstPC

The input point cloud for the scene. Currently, CV_32F is the only supported data type.

Returns

On successful termination, the function returns 0.

It is assumed that the model is registered on the scene. Scene remains static, while the model transforms. The output poses transform the models onto the scene. Because of the point to plane minimization, the scene is expected to have the normals available. Expected to have the normals (Nx6). Scalar output parameters are returned as named fields in this object. Release returned native handles with using or delete(), including handles nested in results.

registerModelToScene1

Perform registration with multiple initial poses

registerModelToScene1(srcPC: Mat, dstPC: Mat, poses: Ptr_cv__ppf_match_3d__Pose3DVector): number;
srcPC

The input point cloud for the model. Expected to have the normals (Nx6). Currently, CV_32F is the only supported data type.

dstPC

The input point cloud for the scene. Currently, CV_32F is the only supported data type.

poses

Input/output value, modified by the native operation. Input poses to start with but also list output of poses.

Returns

On successful termination, the function returns 0.

It is assumed that the model is registered on the scene. Scene remains static, while the model transforms. The output poses transform the models onto the scene. Because of the point to plane minimization, the scene is expected to have the normals available. Expected to have the normals (Nx6).

These signatures describe this package. Upstream documentation can mention optional backends that are absent from this build. Check runtime compatibility before choosing a backend or file format.