Matlab/Octave/Python implementation of the rigid 3D transform algorithm from
"Least-Squares Fitting of Two 3-D Point Sets", Arun, K. S. and Huang, T. S. and Blostein, S. D, IEEE Transactions on Pattern Analysis and Machine Intelligence, Volume 9 Issue 5, May 1987
Given two sets of 3D points and their correspondence the algorithm will return a least square optimal rigid transform (also known as Euclidean) between the two sets. The transform solves for 3D rotation and 3D translation, no scaling.
For Matalb/Octave users have a look at test_rigid_transform_3D.m.
For Python users have a look at test_rigid_transform_3D.py.