10 TEST(PointCloudTest, CopyConstructor2D)
21 TEST(PointCloudTest, FeatureConstructor2D)
31 TEST(PointCloudTest, FeatureConstructor3D)
80 TEST(PointCloudTest, ConstructorWithData)
82 const int nbPoints = 100;
83 const int dimFeatures = 4;
84 const int dimDescriptors = 3;
85 const int dimTime = 2;
87 PM::Matrix randFeat = PM::Matrix::Random(dimFeatures, nbPoints);
92 featLabels.push_back(
DP::Label(
"pad", 1));
94 PM::Matrix randDesc = PM::Matrix::Random(dimDescriptors, nbPoints);
96 descLabels.push_back(
DP::Label(
"dummyDesc", 3));
100 timeLabels.push_back(
DP::Label(
"dummyTime", 2));
103 DP pointCloud =
DP(randFeat, featLabels, randDesc, descLabels, randTimes, timeLabels);
116 TEST(PointCloudTest, ConcatenateFeatures2D)
132 TEST(PointCloudTest, ConcatenateFeatures3D)
148 TEST(PointCloudTest, ConcatenateDescSame)
158 PM::Matrix::Random(5, leftPoints),
159 Labels(Label(
"Desc5D", 5))
164 PM::Matrix::Random(5, rightPoints),
165 Labels(Label(
"Desc5D", 5))
172 TEST(PointCloudTest, ConcatenateDescSame2)
180 const int leftPoints(ref3DCopy.
features.cols() / 2);
181 const int rightPoints(ref3DCopy.
features.cols() - leftPoints);
183 ref3DCopy.
features.leftCols(leftPoints),
189 ref3DCopy.
features.rightCols(rightPoints),
198 TEST(PointCloudTest, ConcatenateDescDiffName)
208 PM::Matrix::Random(5, leftPoints),
209 Labels(Label(
"MyDesc5D", 5))
214 PM::Matrix::Random(5, rightPoints),
215 Labels(Label(
"YourDesc5D", 5))
222 TEST(PointCloudTest, ConcatenateDescDiffSize)
232 PM::Matrix::Random(3, leftPoints),
233 Labels(Label(
"DescND", 3))
238 PM::Matrix::Random(5, rightPoints),
239 Labels(Label(
"DescND", 5))
244 TEST(PointCloudTest, AssertConsistency)
252 PM::DataPoints::Labels labels;
253 labels.push_back(PM::DataPoints::Label(
"FakeDesc", 2));
259 PM::Matrix descriptors = PM::Matrix::Random(2, 10);
265 descriptors = PM::Matrix::Random(1, ref2DCopy.
getNbPoints());
292 TEST(PointCloudTest, AddRemove)
295 const int testedValue = 9;
309 EXPECT_EQ(newFeatureView(0,0), testedValue);
319 const int testedValue2 = 88;
332 EXPECT_EQ(newDescriptor4DView(0,0), testedValue);
334 EXPECT_EQ(newDescriptor2DView(0,0), testedValue2);