Skip to main content

Solve the transform vector and rotation matrix of a rigid point set (order can be changed).

Project description

solve_rigid_point_set_rt_pro

Solve the transform vector and rotation matrix of a rigid point set (order can be changed).

Installation

pip install solve_rigid_point_set_rt_pro

Usage

from solve_rigid_point_set_rt_pro import compute_best_rigid_transform_pro
from solve_rigid_point_set_rt     import compute_best_rigid_transform
from solve_rigid_point_set_rt     import apply_transform
import numpy as np

P = np.array([
    [ 20.606943,  -0.005458,  0.040331], # line 0
    [ -4.885081, -26.211561, -0.023027], # line 1
    [ 12.012958,  20.049110, -0.035819], # line 2
    [-27.734814,   6.167912,  0.018507]  # line 3
])

Q = np.array([
    [-115.37230320753432, 126.89401508498568, 790.1637162115628], # line 2
    [ -137.8636773243661,  96.44871350623225, 808.1944560570211], # line 3
    [-132.94031926182967,  137.4289669332182, 782.6069181107938], # line 0
    [-164.12739196778332, 120.93405919807722, 791.4971644346351]  # line 1
])

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

# 3. Apply transformation and calculate error
P_transformed = apply_transform(P, R_est, t_est)
print(P_transformed)

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

solve_rigid_point_set_rt_pro-0.1.0.tar.gz (2.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

solve_rigid_point_set_rt_pro-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file solve_rigid_point_set_rt_pro-0.1.0.tar.gz.

File metadata

File hashes

Hashes for solve_rigid_point_set_rt_pro-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fc7eb690fded1d47780feb8d5115df9493d8b2d56d2806b0731cff0475c6a783
MD5 4efafb0b43cc411035892be5a9d76b9f
BLAKE2b-256 514a9baeed918423371246ad553c953cb742bbae563edcdb57801eaea17c13c8

See more details on using hashes here.

File details

Details for the file solve_rigid_point_set_rt_pro-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for solve_rigid_point_set_rt_pro-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4a43977cf008cc2bed973f7c2b69bf448918965ae59280acee69a478cb7a424c
MD5 3e0d84611188eed70f735441e35b1b37
BLAKE2b-256 a1bda61913826b04ec44e3819f69d92341720a6b7cd7d2918a726d58876e07c7

See more details on using hashes here.

Supported by

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