Skip to main content

Simple version of the Iterative Closest Point (ICP) algorithm

Project description

simpleICP

This package contains an implementation of a rather simple version of the Iterative Closest Point (ICP) algorithm.

Documentation

This python implementation is just one of several (almost identical) implementations of the ICP algorithm in various programming languages. They all share a common documentation here: https://github.com/pglira/simpleICP

Installation

You can install the simpleicp package from PyPI:

pip install simpleicp

How to use

from simpleicp import simpleicp
import numpy as np

# Read fixed and movable point cloud from xyz files into n-by-3 numpy arrays
X_fix = np.genfromtxt("dragon1.xyz")
X_mov = np.genfromtxt("dragon2.xyz")

# Run simpleICP!
H, X_mov_transformed = simpleicp.simpleicp(X_fix, X_mov)

This should give (except for timestamps and timings) this output:

[11:18:30.890] Create point cloud objects ...
[11:18:30.891] Select points for correspondences within overlap area of fixed point cloud ...
[11:18:30.891] Estimate normals of selected points ...
[11:18:31.048] Start iterations ...
[11:18:31.084] Iteration | correspondences | mean(residuals) | std(residuals)
[11:18:31.084]         0 |             768 |          0.0464 |          0.3179
[11:18:31.084]         1 |             768 |          0.0124 |          0.2534
[11:18:31.155]         2 |             773 |          0.0100 |          0.1655
[11:18:31.212]         3 |             772 |          0.0040 |          0.0830
[11:18:31.306]         4 |             749 |          0.0010 |          0.0191
[11:18:31.415]         5 |             758 |         -0.0000 |          0.0024
[11:18:31.487]         6 |             774 |          0.0000 |          0.0022
[11:18:31.556] Convergence criteria fulfilled -> stop iteration!
[11:18:31.556] Estimated transformation matrix H:
[11:18:31.557] H = [    0.998693     0.052911    -0.034201    -0.197402]
[11:18:31.557] H = [   -0.052402     0.999035     0.019119    -0.400079]
[11:18:31.557] H = [    0.034816    -0.017661     0.999446    -0.602222]
[11:18:31.558] H = [    0.000000     0.000000     0.000000     1.000000]
[11:18:31.558] Finished in 0.669 seconds!

Note that dragon1.xyz and dragon2.xyz are not included in this package. They can be downloaded (among other example files) here.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

simpleicp-1.0.2.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

simpleicp-1.0.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file simpleicp-1.0.2.tar.gz.

File metadata

  • Download URL: simpleicp-1.0.2.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for simpleicp-1.0.2.tar.gz
Algorithm Hash digest
SHA256 75c3d308d86f8f0f35be0801bfaf77d9d9284e8991589837b671949d015e3ebb
MD5 4acb7ebb7215c89ce3f5a6b5dcd89e14
BLAKE2b-256 88a60958c9d8201c6e77a6c8345edfe394cfed6b5e19ed45f9a398249aad1ed7

See more details on using hashes here.

File details

Details for the file simpleicp-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: simpleicp-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for simpleicp-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c412617bde57bd96e14e24a87e68777a8e1abb0cc04e9625a5a74e21b75f7eea
MD5 ac96d2e3fcf8be5d9bc807907b403ac9
BLAKE2b-256 81a1f52200da50401fdf7ccde5949640d68c25a32d95e075223202af88edb5e3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page