gadomski / cpd

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

obtain the vector field using the nonrigid transformation #123

Closed lujaindong closed 7 years ago

lujaindong commented 7 years ago

Hi I am using the nonrigid transformation to align my own data sets. The code works fine but I can't find any output results about the registration. How can I get the vector field using this CPD? Any idea?

gadomski commented 7 years ago

You can get the vector field by subtracting the pre-registration points from the post-registration points:

cpd::Matrix fixed = load_points_from_somewhere();
cpd::Matrix moving = load_points_from_somewhere();
cpd::NonrigidResult result = cpd::nonrigid(fixed, moving);
cpd::Matrix vector_field = result.points - moving;