Skip to main content
ClaudeWave
ES, Spanish
Skill1.2k estrellas del repoactualizado 6d ago

matlab-point-cloud-registration

This MATLAB skill registers 3-D point clouds using multiple algorithms including ICP variants, NDT, LOAM, and other methods. Use it when aligning point cloud objects, selecting or tuning registration algorithms, preprocessing point clouds, building maps from lidar scans, or combining registered point clouds into unified datasets.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/matlab/matlab-agentic-toolkit /tmp/matlab-point-cloud-registration && cp -r /tmp/matlab-point-cloud-registration/skills-catalog/image-processing-and-computer-vision/matlab-point-cloud-registration ~/.claude/skills/matlab-point-cloud-registration
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# 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 `gridAverag
matlab-access-datafeedSkill

>

matlab-analyze-ams-waveformSkill

Analyze AMS waveform data using Mixed-Signal Blockset utilities: phase noise measurement, clock jitter, anti-aliased resampling, timing measurements, lock time, INL/DNL, ADC/DAC calibration, HSpice import. Use when analyzing time-domain voltage from PLL/VCO/clock simulations, measuring phase noise from variable-step solver output, computing jitter, or resampling non-uniform data.

matlab-analyze-dataSkill

Analyze data using MATLAB. Use when the task involves tables, timetables, time-series data, numeric arrays, sensor matrices, or gridded data — including but not limited to exploring, filtering, sorting, cleaning, transforming, aggregating, smoothing, padding, trimming, and answering questions about data. MATLAB provides extensive, easy-to-use built-in functions for these workflows with no additional products required.

matlab-analyze-dependenciesSkill

Analyze the effective toolbox file set to produce a Dependency Manifest — classify all transitive dependencies as included, product, add-on, or external-unresolved, then present resolution options with tradeoffs. Use after matlab-define-toolbox-api when the spec is approved.

matlab-analyze-emSkill

S-parameters, insertion loss, fields, currents, mesh control, and solver selection for RF PCB performance validation. TRIGGER: user asks to compute S-parameters, analyze insertion/return loss, extract fields or currents, compare MoM vs FEM, or control mesh for any RF PCB component. Invoke BEFORE writing sparameters() or solver code — API is non-obvious. SKIP: designing or creating components (use the specific matlab-design-pcb-* skill), material/stackup setup only (use matlab-manage-pcb-material), optimization sweeps (use matlab-optimize-pcb-design), PDN/IR-drop analysis (use matlab-analyze-pcb-pdn).

matlab-analyze-installed-antennaSkill

Analyze antennas installed on electrically large conducting platforms using MATLAB Antenna Toolbox. Loads platform geometry from STL/STEP/IGES, installs antenna elements, selects electromagnetic solvers (MoM-PO, FMM, MoM), and computes patterns, impedance, coupling, and efficiency. Use when the user wants to model an antenna on a vehicle, aircraft, ship, satellite, or other large structure.

matlab-analyze-pcb-pdnSkill

PDN DC voltage/current analysis, IR drop, design rule checking, and multi-net batch analysis on imported PCB layouts. TRIGGER: user asks about power integrity, PDN analysis, IR drop, voltage distribution, current density, power nets, or design rule checking on a PCB. Invoke BEFORE writing code — the PDN API chain is specialized and non-obvious. SKIP: importing a PCB file (use matlab-read-pcb-layout), EM field/S-parameter extraction (use matlab-analyze-em), material/stackup setup only (use matlab-manage-pcb-material), transmission line design (use matlab-design-pcb-txline).

matlab-analyze-rcsSkill

Calculate and visualize monostatic and bistatic radar cross section (RCS) using MATLAB Antenna Toolbox. Computes RCS of platforms, antennas, and arrays with PO, MoM, and FMM solvers, supporting HH/VV/HV/VH polarization, GPU acceleration, and near-field observation. Use when the user wants to compute, plot, or analyze radar cross section.