question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Automatic transformation matrix

See original GitHub issue

Hi @marcomusy,

I have a couple of point clouds (of a similar object but different type, plains in this case) which are randomly positioned. Now I would like to find the transformation matrix so that all the point clouds to have the same orientation/translation:

from glob import glob
import natsort
import vedo as vd

pcdFiles = natsort.natsorted(glob('**/*.xyz', recursive=True))

for i, pcdFile in enumerate(pcdFiles):
    print(pcdFile)
    s = vd.Points(pcdFile).alpha(0.2)
    vd.show(s, axes=8)

Target position (airplane_0000.xyz): image

Transformation to be found: image image image

I am not sure how easy this can be done, possibly using a shape similarity metric or something similar.

testing_samples.zip

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
marcomusycommented, Sep 29, 2021

you can also compute normals for pure pointclouds with myptcloud.computeNormalsWithPCA(). i don’t know how well it works, i’ve never tested it throughly…

1reaction
ttsesmcommented, Sep 29, 2021

Thanks Marco, interesting note regarding the hausdorf distance (I was not aware of it, I knew the chamfer distance) I found also an alternative to ICP which takes into account normals as well https://laempy.github.io/pyoints/tutorials/icp.html#NICP-algorithm. This might also get into hand.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automatic Calculation of a Transformation Matrix Between ...
The transformation matrix is calculated by applying a linear regression to matched data in two coordinate frames. This method scales linearly ...
Read more >
Transformation Matrix Guide - Rainmeter Documentation
The transformation matrix used by Rainmeter is exactly like this. ... There are many different resources that will multiply matrices automatically.
Read more >
Spatial Transformation Matrices - BrainVoyager
The topic describes how affine spatial transformation matrices are used to represent the orientation and position of a coordinate system within a "world" ......
Read more >
Matrices as transformations (article) - Khan Academy
If we think about a matrix as a transformation of space it can lead to a deeper understanding of matrix operations. This viewpoint...
Read more >
Homogeneous Transformation Matrices Using Denavit ...
We now want to find the homogeneous transformation matrix from frame 0 to frame 1, so we look at the first row of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found