SkillAgentSearch skills...

matlab-register-point-clouds

Register 3-D point clouds using ICP, NDT, LOAM, FGR, phase correlation, and CPD algorithms

Install / Use

npx skills add matlab/matlab-agentic-toolkit --skill matlab-register-point-clouds

Installs into whichever agent you are using.

About this skill
📄

SKILL.md

Installable skill definition

Quality Score

90/100

Supported Platforms

Universal

Tags

Our assessment of matlab-register-point-clouds

matlab-register-point-clouds scores 90/100 on our quality scale, 1537th of 4,582 Development & Engineering skills we index (top 34%).

Its SKILL.md is 17 KB long, well organised into 28 sections with 12 code examples: a thorough specification that gives an agent plenty to work with.

With 1,098 GitHub stars, it is one of the more widely adopted skills in the catalogue.

Substance
30/30
Structure
20/20
Description
12/15
Adoption
13/20
Freshness
15/15

Maintenance, license and trust

  • The repository was last updated 21 days ago, so matlab-register-point-clouds is actively maintained.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 88/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.

matlab-register-point-clouds compared with similar skills

All 4 of these similar skills score higher than matlab-register-point-clouds; compare them before choosing.

SkillScoreStarsUpdatedFormat
matlab-register-point-clouds (this skill)by matlab901.1k21d agoSKILL.md
ai-job-searchby MadsLorentzen10045.1k1d agoCLAUDE.md
claude-howtoby luongnv8910041.8k6d agoCLAUDE.md
algorithmic-artby anthropics100177.9k14d agoSKILL.md
pptxby anthropics100177.9k14d agoSKILL.md

Frequently asked questions

How do I install matlab-register-point-clouds?
Run npx skills add matlab/matlab-agentic-toolkit --skill matlab-register-point-clouds. The install tabs above show the steps for each supported agent.
Which AI agents does matlab-register-point-clouds work with?
It is written for Universal, as a SKILL.md file. Other agents that read the same format can often use it too.
Is matlab-register-point-clouds safe to use?
It declares no license and scores 88/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is matlab-register-point-clouds still maintained?
The repository was last updated 21 days ago, so matlab-register-point-clouds is actively maintained.

name: matlab-register-point-clouds description: Register 3-D point clouds using ICP, NDT, LOAM, FGR, phase correlation, and CPD algorithms. Use when registering or aligning 3-D point clouds, choosing a registration algorithm, tuning registration parameters, preprocessing point clouds for registration or combining point clouds after registration. license: https://www.mathworks.com/content/dam/mathworks/license/pmrl/license.md metadata: author: MathWorks version: "2.0"

Point Cloud Registration

Select pcregistericp with Metric="planeToPlane" as the starting point, evaluate algorithm accuracy using RMSE, and align the point clouds using pcalign.

When to Use

  • User asks to register, align or match 3-D point clouds represented as pointCloud objects
  • User needs to choose or tune a registration algorithm
  • User wants to build a map from multiple lidar scans
  • User wants to combine or merge registered point clouds
  • User asks about initial transformation estimation for registration
  • User asks to preprocess point clouds before registration

When NOT to Use

  • User wants to register 2-D point clouds (use matchScans, matchScansGrid, or matchScansLine)
  • User wants image registration (use imregtform or imregcorr from Image Processing Toolbox)

Required Toolboxes

  • Computer Vision Toolbox
  • Lidar Toolbox

Legacy Patterns to Avoid

| Do NOT use | Use instead | Why | |------------|-------------|-----| | rigid3d for InitialTransform | rigidtform3d | rigidtform3d uses the premultiply transformation convention, which is more commonly used.|

Algorithm Selection Guide

Local Registration

If you have an initial transformation or the point clouds are only slightly misaligned, try these local registration methods in this order. Use the RMSE output as the accuracy metric to minimize.

| Algorithm | Function | Notes | |-----------|----------|-------| | Generalized ICP (plane-to-plane) | pcregistericp with Metric="planeToPlane" | Default starting point. Additionally, try "planeToPlaneWithColor" if the point cloud has color. | | ICP (point-to-plane) | pcregistericp with Metric="pointToPlane" | Additionally, try "pointToPlaneWithColor" if the point cloud has color. | | ICP (point-to-point) | pcregistericp with Metric="pointToPoint" | Simplest metric. Try if plane-based metrics are inaccurate. | | LOAM | pcregisterloam | Requires organized point clouds. If the point cloud is not organized, but you have the lidar parameters available, use pcorganize to organize the point cloud. Use detectLOAMFeatures first to tune feature detection. It gives you more flexibility on the accuracy vs speed tradeoff since detectLOAMFeatures has parameters to control the number of features. | | NDT | pcregisterndt | Tune the gridStep parameter for the scale of the scene. |

Ground Data Registration

If you don't have an initial transformation, but you know that the data corresponds to ground data, try phase correlation.

| Algorithm | Function | Notes | |-----------|----------|-------| | Phase Correlation | pcregistercorr | Specifically designed for ground data. Not a local registration method. |

Global Registration

If there is no initial transformation and the point clouds are significantly misaligned (overlap less than 50%), first use a global registration approach to align the moving point cloud to the fixed point cloud, then optionally use a local registration method as a refinement step to improve accuracy. Note that global registration approaches are usually slower than local ones.

| Algorithm | Function | Notes | |-----------|----------|-------| | FGR | pcregisterfgr | Feature-based approach. | | CPD (rigid) | pcregistercpd with Transform="Rigid" | Probabilistic framework. It handles outliers well. Use for small point clouds. | | CPD (nonrigid) | pcregistercpd with Transform="Nonrigid" | Only option for non-rigid/deformable registration. | | FPFH feature matching | extractFPFHFeatures + pcmatchfeatures + estgeotform3d | Extract FPFH descriptors, match features, and estimate the transformation using the MSAC algorithm (a variant of RANSAC). Tune NumNeighbors in extractFPFHFeatures and gridStep in pcdownsample to ensure enough features and feature matches. |

General Guidelines

  • The initial transformation is the transformation that aligns the moving point cloud to the fixed point cloud. It is important to set the InitialTransform name-value argument for local registration algorithms when an estimate is available. If registering a sequence of point clouds and no other estimate is available, assume constant speed and set the initial transformation to the transformation estimated between the previous pair of point clouds.
  • The RMSE output of pcregisterfgr is not comparable to the RMSE output of the other registration functions because it is the root mean squared error between only inlier points. Use the Point Cloud Registration Analyzer app for comparable RMSE values between all registration approaches.
  • When comparing registration algorithms, check if the point clouds are organized (i.e., ndims(ptCloud.Location) == 3). If they are organized, include LOAM in the comparison. If they are not organized, but lidar parameters are available (e.g., from the sensor metadata or the user), use pcorganize to organize the point clouds and include LOAM in the comparison. Exclude LOAM when the point clouds are unorganized and no lidar parameters are available.
  • When registering a sequence of organized point clouds with LOAM, use pcmaploam to refine the transformations and improve map accuracy in addition to pairwise pcregisterloam registration.
  • Use pcshowpair to visualize the alignment between a pair of registered point clouds.

Preprocessing Steps

  • When using select to filter points from an organized point cloud, always set OutputSize="full" to preserve the organized structure.
  • To improve the speed and accuracy of the registration, use findPointsInCylinder as a cylindrical filter to remove artifacts from the ego vehicle and noise from distant points. Only use findPointsInCylinder for point clouds from spinning lidar sensors.
  • Downsampling can speed up registration and improve accuracy by removing the effects of noisy points. Use pcdownsample to downsample the point clouds before registration. The recommended approach for registration is the gridAverage or the gridNearest methods. gridAverage is faster and gridNearest returns more accurate color, normal, and intensity values if available in the point cloud.
  • Ground removal is not recommended since it can introduce misalignment in the XY plane. In some scenarios it helps speed up registration and improve accuracy, but first evaluate registration results without ground removal. Then, use either segmentGroundSMRF for more accurate ground removal or pcfitplane to get a faster approximation of the ground points.

Parameter Tuning

When tuning parameters, try a range of values between the typical values listed below (choose a step so that it does not exceed 10 values to try). Then, narrow it down further by trying values closer to the best result from that round. The best result corresponds to the lowest RMSE.

Preprocessing Functions

| Function | Parameter | Typical Range | Tuning Strategy | |----------|-----------|---------------|-----------------| | findPointsInCylinder | radius(2) (max radius) | 90%–100% of point cloud extent | Compute extent as max(abs([ptCloud.XLimits, ptCloud.YLimits])). Try without findPointsInCylinder too. | | findPointsInCylinder | radius(1) (min radius) | 0–10 | Must be less than radius(2). Keep small until it fully removes the ego vehicle. | | pcdownsample | gridStep | 0.01–1.0 | |

Registration Functions

| Function | Parameter | Typical Range | Tuning Strategy | |----------|-----------|---------------|-----------------| | pcregistericp | Metric | All metric values | Try each metric. | | pcregistericp | InlierRatio | 0.5–1.0 (default: 1) | | | pcregisterndt | gridStep | 0.01–1.5 | | | pcregisterndt | OutlierRatio | 0.1–1.0 (default: 0.55) | | | pcregisterloam / LOAMPoints / downsampleLessPlanar | gridStep | 0.1–2.0 | | | pcregisterloam / detectLOAMFeatures | NumRegionsPerLaser | 4-15 (default: 6) | Try increasing to extract more features. The value must be an integer. | | pcregisterloam / detectLOAMFeatures | MaxSharpEdgePoints, MaxPlanarSurfacePoints | Above defaults of 1 | Try increasing to extract more features. The value must be an integer. | | pcmaploam | voxelSize | 0.1–2.0 | | | pcmaploam / findPose | SearchRadius | 2–5 (default: 3) | | | pcregisterfgr | gridSize | 0.01–1.5 | | | pcregistercpd | OutlierRatio | 0.1–0.9 (default: 0.1) | | | pcregistercorr | gridSize | 50–250 | | | pcregistercorr | gridStep | 0.01–1.5 | | | pcmatchfeatures | MatchThreshold | 0.01–1.0 (default: 0.01) | Increase to allow more matches. | | pcmatchfeatures | RejectRatio | 0.9–0.99 (default: 0.95) | Increase if getting 0 matches. | | estgeotform3d | MaxDistance | 0.1–5.0 (default: 1.0) | Decrease for stricter inlier filtering. |

Combining Point Clouds

  • If you found transformations that align a sequence of point clouds, use pcalign to combine them efficiently. pcalign applies a grid filter across the resulting point cloud to eliminate duplicate points, producing a uniformly dense point cloud.
  • If you are combining point clouds that were already transformed using pctransform and you need to preserve every point without any downsampling, use pccat. pccat is the fastest approach since it only concatenates points, but results in a larger point cloud with potential duplicates that can affect the speed and accuracy of downstream workflows.
  • If you are combining just 2 point clouds at a time that were already transformed using pctransform and you want to downsample only the region of overlap to remove duplicate points, use pcmerge. Note that the density of the resulting point cloud may not be uniform since downsampling is only applied to the overlap area. pcalign is recommended over pcmerge because it is faster, supports more than 2 point clouds, produces uniform density, and performs the alignment of the point clouds using the transformation from registration.

Interactive Comparison

Use the Point Cloud Registration Analyzer app to visually compare algorithms, tune parameters, and analyze results interactively:

pointCloudRegistrationAnalyzer

The app supports ICP, NDT, LOAM, FGR, Phase Correlation, and CPD. It provides preprocessing (ROI, downsample, ground removal), side-by-side comparison, and it exports the results to the workspace. It supports registration of a pair of point clouds and currently, it does not support the planeToPlaneWithColor and pointToPlaneWithColor metrics of ICP.

Patterns

Basic Registration

fixedPtCloud = pcread("scan1.pcd");
movingPtCloud = pcread("scan2.pcd");

[tform,movingReg,rmse] = pcregistericp(movingPtCloud,fixedPtCloud,Metric="planeToPlane");
pcshowpair(movingReg,fixedPtCloud)

Preprocessing: Cylindrical Filter and Downsample

radius = [4 100];
idx = findPointsInCylinder(ptCloud,radius);
ptCloudFiltered = select(ptCloud,idx,OutputSize="full");
gridStep = 0.1;
ptCloudDownsampled = pcdownsample(ptCloudFiltered,"gridAverage",gridStep);

Registration with Preprocessing

fixedPtCloud = pcread("scan1.pcd");
movingPtCloud = pcread("scan2.pcd");

% Preprocess
radius = [4 100];
gridStep = 0.1;
fixedIdx = findPointsInCylinder(fixedPtCloud,radius);
fixedFiltered = select(fixedPtCloud,fixedIdx,OutputSize="full");
fixedDownsampled = pcdownsample(fixedFiltered,"gridAverage",gridStep);
movingIdx = findPointsInCylinder(movingPtCloud,radius);
movingFiltered = select(m

Truncated for display — read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars1.1k
CategoryDevelopment
Updated21d ago
Forks134

Languages

MATLAB

Trust signals

88/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 medium