29 errorMin =
PM::get().ErrorMinimizerRegistrar.create(name);
30 icp.errorMinimizer = errorMin;
37 setError(
"PointToPointErrorMinimizer");
38 validate2dTransformation();
39 validate3dTransformation();
44 setError(
"PointToPlaneErrorMinimizer");
45 validate2dTransformation();
46 validate3dTransformation();
51 const unsigned int nbPoints = 100;
52 const unsigned int dimFeatures = 4;
53 const unsigned int dimDescriptors = 3;
54 const unsigned int dimTime = 2;
57 PM::Matrix randFeat = PM::Matrix::Random(dimFeatures, nbPoints);
62 featLabels.push_back(
DP::Label(
"pad", 1));
64 PM::Matrix randDesc = PM::Matrix::Random(dimDescriptors, nbPoints);
66 descLabels.push_back(
DP::Label(
"dummyDesc", 3));
70 timeLabels.push_back(
DP::Label(
"dummyTime", 2));
73 DP request =
DP(randFeat, featLabels, randDesc, descLabels, randTimes, timeLabels);
74 DP source =
DP(randFeat, featLabels, randDesc, descLabels, randTimes, timeLabels);
80 PM::Matches::Ids ids(1, nbPoints);
81 PM::Matches::Dists dists(1, nbPoints);
83 for(
unsigned int i=0; i<nbPoints; i++)
97 EXPECT_EQ(mPts.reference.getNbPoints(), nbPoints);
98 EXPECT_EQ(mPts.reference.getNbPoints(), mPts.reading.getNbPoints());
101 EXPECT_EQ(mPts.reference.getDescriptorDim(), dimDescriptors);
104 EXPECT_EQ(mPts.reference.getTimeDim(), dimTime);
Matrix OutlierWeights
Weights of the associations between the points in Matches and the points in the reference.
A structure holding data ready for minimization. The data are "normalized", for instance there are no...
std::shared_ptr< PM::ErrorMinimizer > errorMin
void setError(string name)
The name for a certain number of dim.
Eigen::Matrix< float, Eigen::Dynamic, Eigen::Dynamic > Matrix
A dense matrix over ScalarType.
Functions and classes that are not dependant on scalar type are defined in this namespace.
static const PointMatcher & get()
Return instances.
TEST_F(ErrorMinimizerTest, PointToPointErrorMinimizer)
Eigen::Matrix< std::int64_t, Eigen::Dynamic, Eigen::Dynamic > Int64Matrix
A dense signed 64-bits matrix.
#define EXPECT_EQ(expected, actual)
ErrorMinimizer::ErrorElements ErrorElements