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, rank_idx=0)

# 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.1.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.1-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.1.tar.gz.

File metadata

File hashes

Hashes for solve_rigid_point_set_rt_pro-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6deba79236d05bfe279a49a99e4d6ee6f076b323f8753b6c538f9dae6451eb2f
MD5 ca9807228951cbc8ae9a65aacda5ec78
BLAKE2b-256 4373b960e1aa14a8fbe8d332b6ca16125f399a0a8836cd3e7665d7393545fe80

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for solve_rigid_point_set_rt_pro-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ddb8f4e84e1dfcb7f1a0412b9ca2d34a1375e7ca0b46169609a56e6834862bfd
MD5 479661fb4d77ad046a9b59b3258e31ba
BLAKE2b-256 84215b4ca18493268e65b9b321e9adea1ba9efd794c76fa6cf838b1db9ce5617

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