Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: SVD (or similar) for alignment of more than 3 points #2

Open
MysteryPancake opened this issue Jun 1, 2024 · 1 comment

Comments

@MysteryPancake
Copy link

MysteryPancake commented Jun 1, 2024

I saw Ian's video on the camera track alignment tools today. I was trying to add a similar tool to Blender recently.

The main difference is the method I used works on more than 3 points, which could be useful for more complex tracks. It's the same as Extract Transform in Houdini, used to align two point clouds.

For translation and rotation, you can use this method. It uses centroid difference to get the translation, then SVD decomposition to find the rotation, which is meant to be optimal in terms of least squares error.

For scale you can try the umeyama method, but I found it doesn't work for negative scales.

@cessen
Copy link
Contributor

cessen commented Sep 25, 2024

Thanks for the suggestion! I do think that could be nice, but it's basically a time/benefit trade off on my side. The three-point based approach is super simple and works for all the cases we've needed so far, and implementing a more complex approach just isn't currently something I want to spend my time on.

In the future if we run into cases that need a more sophisticated approach, I'll put the time in then.

Alternatively, I'd be happy to accept a good PR that implements that as an additional (not replacement) method that the user can choose to use. So if you want to put in the time yourself, please feel free. The contribution would be very welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants