E3DAlignment Align Sample

This code snippet shows how to apply the transformation of the E3DAlignment to the sample to overlap it on the reference.

C++

#include <eVision/Easy3D/Easy3DMatch/E3DAlignment.h>
using namespace eVision::Easy3D;
// perform alignment (see previous examples)
E3DAlignment alignment;
EPointCloud sample;

// align sample on reference
EPointCloud alignedSample;
EAffineTransformer::ApplyMatrix(alignment.GetPose(), sample, alignedSample);

C#

using eVision.Easy3D;
// perform alignment (see previous examples)
E3DAlignment alignment = new E3DAlignment(); // obtained with E3DAligner
EPointCloud sample = new EPointCloud(); // same pointcloud as the input of the E3DAligner

// align sample on reference
EPointCloud alignedSample = new EPointCloud();
EAffineTransformer.ApplyMatrix(alignment.Pose, sample, alignedSample);

Python

from eVision import Easy3D
# perform alignment (see previous examples)
alignment = Easy3D.E3DAlignment() # obtained with E3DAligner
sample = Easy3D.EPointCloud() # same pointcloud as the input of the E3DAligner

# align sample on reference
aligned_sample = Easy3D.EPointCloud()
Easy3D.EAffineTransformer.ApplyMatrix(alignment.Pose, sample, aligned_sample)