Skip to main content

solve_rigid_point_set_rt

Solve the transform vector and rotation matrix of a rigid point set.

Installation

pip install solve_rigid_point_set_rt

Usage

from solve_rigid_point_set_rt import compute_best_rigid_transform
from solve_rigid_point_set_rt import apply_transform
from solve_rigid_point_set_rt import calculate_error
import numpy as np

P = np.array([
    [ 20.606943,  -0.005458,  0.040331],
    [ -4.885081, -26.211561, -0.023027],
    [ 12.012958,  20.049110, -0.035819],
    [-27.734814,   6.167912,  0.018507]
])

Q = np.array([
    [-132.94031926182967, 137.4289669332182, 782.6069181107938],
    [-164.12739196778332, 120.93405919807722, 791.4971644346351],
    [-115.37230320753432, 126.89401508498568, 790.1637162115628],
    [-137.8636773243661, 96.44871350623225, 808.1944560570211]
])

# 2. Compute optimal rotation and translation
R_est, t_est = compute_best_rigid_transform(P, Q)

# 3. Apply transformation and calculate error
P_transformed = apply_transform(P, R_est, t_est)
rmse, mean_dist, _ = calculate_error(P_transformed, Q)

# 4. Print results
print("="*50)
print("Optimal Rotation Matrix R:")
print(R_est)
print("\nOptimal Translation Vector t:")
print(t_est)
print("\nRegistration Accuracy:")
print(f"Root Mean Square Error (RMSE): {rmse:.6f}")
print(f"Mean Euclidean Distance: {mean_dist:.6f}")
print("="*50)

Metadata

Release files for solve-rigid-point-set-rt 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for solve-rigid-point-set-rt 0.1.0
File Size Uploaded
solve_rigid_point_set_rt-0.1.0.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for solve-rigid-point-set-rt 0.1.0
File Interpreter ABI Platform
solve_rigid_point_set_rt-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 7.0 kB

Release files / solve_rigid_point_set_rt-0.1.0.tar.gz

Download URL solve_rigid_point_set_rt-0.1.0.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b18afb47459df24577d1db8b06bab9a4a6127be3218e4f386e418af88e2c2928
BLAKE2b-256 checksum
How to use checksums
2c0cfc955793e8c5505a6f0532144fa3f96d2e6ea42d1fae6be740cfe8701587
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.13.12 Windows/11

Release files / solve_rigid_point_set_rt-0.1.0-py3-none-any.whl

Download URL solve_rigid_point_set_rt-0.1.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e80090750054c79aedb5dcbd5555791e0cdebbcf9c7ea5d1bb069ae5302cc0fe
BLAKE2b-256 checksum
How to use checksums
2f486a38f9d88b84dae318308912762c91fa076e9282e5e14cadd18d13b6038c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.3.2 CPython/3.13.12 Windows/11

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page