icpts

TypeScript implementation of iterative closest point (ICP) for point cloud registration

https://github.com/yyassin/icpts

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.6%) to scientific vocabulary

Keywords

closest eigen icp iterative iterative-closest-point javascript linear-algebra point point-cloud point-cloud-registration point-to-plane point-to-point pointcloud pseudoinverse surface-normals-estimation threejs typescript
Last synced: 6 months ago · JSON representation ·

Repository

TypeScript implementation of iterative closest point (ICP) for point cloud registration

Basic Info
Statistics
  • Stars: 5
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
closest eigen icp iterative iterative-closest-point javascript linear-algebra point point-cloud point-cloud-registration point-to-plane point-to-point pointcloud pseudoinverse surface-normals-estimation threejs typescript
Created almost 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme License Citation

README.md

icp-ts

A Typescript implementation of the iterative closest point algorithm using both the point-to-point and point-to-plane variants, used for point cloud registration. An example of usage is shown in the provided React Three Fiber demo; you can visit the demo here.

floralyfe-demo

Installation

  • Simply install the npm package with the command below bash $ npm install icpts

  • If you'd like to build from source, pull the repository and navigate to the icpts directory. Run npm i to install the dependencies, followed by npm run build to build the package. The build artifacts will be placed in the dist directory, and the project can be used as a local node module.

Usage

First import the package.

typescript import icpts from "icpts"

We expose both ICP strategies using seperate functions under the names icpts.pointToPlane and icpts.pointToPoint. Both strategies have identical interfaces. We expect the points from two point clouds, a source and a reference, to be provided using flat arrays ([x, y, z][]). Additional options are exposed to provide an error tolerance for early stopping, a maximum iteration count and an initial source pose transform.

Each strategy returns the optimal transform from the source cloud to the reference, stored in a flat array using column major ordering. The final error is also returned. Assuming source and reference are defined:

```typescript import icpts from "icpts"

const options = { initialPose: IDENTITY, // [1, 0, 0, 0, 0, 1, ...] tolerance: 1e-10, maxIterations: 50 };

const { transform, error } = icpts.pointToPoint(source, reference, options); // or icpts.pointToPlane ```

You may refer to more detailed example usage in icpts-demo or in the icpts tests, specifically icpts.test.ts;

Local Development

Pull requests, and general improvements / feedback are welcome. To run the project locally, follow the steps below:

  • Pull the repository and navigate to the icpts directory.
  • Run npm i to install the dependencies.
  • That's pretty much it. To test that everything is working, you can run the primary test with ts-node ./test/icp.test.ts (yes, a test framework probably should've been added but we also don't have that many tests yet).

To run the demo site, navigate to the root of the repo and run pnpm install to install the dependencies. The site can be launched locally by then running pnpm dev and navigating to localhost:3000.

Why does this exist?

Good question, it probably shouldn't (and I wouldn't recommend using it for anything half serious). To answer the question though, no one was brave enough to publish an ICP library using JavaScript/TypeScript (for good reason) so we decided why not? We also tried to make it somewhat readable.

Limitations

  • Please note that there are limitations on the point cloud sizes due to the usage of wasm (with eigen-js) and the associated limitation on memory.
  • Also due to the eigen dependency, the package is not fully supported in browser environments (and it certainly won't work in a web worker, so you wouldn't want to use it in a browser anyway). You can, however, easily use it on any node-based server, including Next JS server-side APIs.
  • We are not using any robust variants of ICP, so successful point cloud registration requires decent initialization with some overlap between the clouds. Nevertheless, it seems like point-to-point seems to be more robust to the initial pose but converges more slowly than point-to-plane.

TODO

  • [ ] Generalized ICP
  • [ ] Consider adding more tests.

References

Owner

  • Name: Yousef Yassin
  • Login: Yyassin
  • Kind: user
  • Location: Ottawa, Ontario

🕊️

Citation (citation.cff)

cff-version: 1.2.0
message: 'If you use this software, please cite it as below.'
authors:
  - family-names: 'Yassin'
    given-names: 'Yousef'
title: 'icpts'
version: 0.5.0
date-released: 2023-07-15
url: 'https://github.com/Yyassin/icpts'

GitHub Events

Total
  • Watch event: 2
Last Year
  • Watch event: 2

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 17
  • Total Committers: 1
  • Avg Commits per committer: 17.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 17
  • Committers: 1
  • Avg Commits per committer: 17.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Yousef Yassin y****n@c****a 17
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • npm 35 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 7
  • Total maintainers: 1
npmjs.org: icpts

TypeScript based library for iterative closest point (icp).

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 35 Last month
Rankings
Dependent repos count: 19.0%
Average: 22.7%
Dependent packages count: 26.5%
Maintainers (1)
Last synced: 6 months ago