top | item 34733663

(no title)

ntr-- | 3 years ago

I worked on a very interesting project aligning point clouds using SVD, for a pair of point clouds of the same scene that are not aligned:

- select 3+ pairs of matching points in each cloud (tops of trees, edges of a building etc)

- calculate the vector to the centroid of each cloud

- use SVD to calculate the rotation that gives a minimum distance when applied from the source to the target

- translate and rotate the source cloud to the target

I did this using the rust nalgebra^1 crate after reading a very helpful paper^2 detailing the process. I had planned to build the rust lib into WASM so the process could be run alongside the browser based point cloud visualiser we were using, but had limited time and instead used Neon^3 to build a native binding for our nodejs server to use.

^1 https://docs.rs/nalgebra/latest/nalgebra/linalg/struct.SVD.h...

^2 https://igl.ethz.ch/projects/ARAP/svd_rot.pdf

^3 https://github.com/neon-bindings/neon

discuss

order

foooobaba|3 years ago

This is cool, I briefly read through the paper, one thing I’m curious of is how hard it would be to add ability to do scale transformation (eg zoom in/zoom out) in addition to translation and rotational transformations. Would it be as simple as just adding a scale factor to the optimization objective and rework a bit of the math?