gadomski / cpd

C++ implementation of the Coherent Point Drift point set registration algorithm.
http://www.gadom.ski/cpd
GNU General Public License v2.0
401 stars 124 forks source link

How can we get transform such as rotation,scaling or translation? #35

Closed xmq731 closed 9 years ago

xmq731 commented 9 years ago
As we got that A from Y = X*A,how we depose A to  S,R,T,satisify S*R*T=A

so far, Rigrid model was sloved,UnRigrid model was hard to knuw,that all.Thanks

gadomski commented 9 years ago

There's no rotation matrix available for the nonrigid transformation; compare the transformed points to their original location to get the displacement information. By default, the command-line executable provides these deltas in the fourth through sixth columns.

For the rigid transformation, we can provide a 4x4 transformation matrix, though right now it is not available to either the API or the command-line output. I'll add that ability to fix that part of this issue.

gadomski commented 9 years ago

@xmq731 the transformation matrix found by the rigid registration is now available as the .transformation member variable of the Result object: https://github.com/gadomski/cpd/blob/master/include/cpd/registration.hpp#L41.

Note that this is only available for rigid registrations — no transformation is available for nonrigid registration at this time, since I'm not sure that transformation matrix is all that useful. If it would be useful I could expose it.

This also doesn't spit out the transformation matrix to standard output when running CPD from the command line. Were use you using the API or the command-line invocation?

gadomski commented 9 years ago

Closing as fixed-part-of-it.