Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions test/surface/test_moving_least_squares.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,36 @@ PointCloud<PointNormal>::Ptr cloud_with_normals1 (new PointCloud<PointNormal>);
search::KdTree<PointXYZ>::Ptr tree3;
search::KdTree<PointNormal>::Ptr tree4;

TEST(PCL, MovingLeastSquares_almost_on_line)
{
PointCloud<PointXYZ>::Ptr cloud_almost_on_line (new PointCloud<PointXYZ>);
cloud_almost_on_line->push_back(pcl::PointXYZ(-89.546, 4.03964, 450.883));
cloud_almost_on_line->push_back(pcl::PointXYZ(-88.8728, 4.03964, 450.883));
cloud_almost_on_line->push_back(pcl::PointXYZ(-86.8529, 4.03964, 450.883));
cloud_almost_on_line->push_back(pcl::PointXYZ(-85.5064, 4.03964, 450.883));

// Init objects
PointCloud<PointXYZ> mls_points;
MovingLeastSquares<PointXYZ, PointXYZ> mls;

// Set parameters
mls.setInputCloud(cloud_almost_on_line);
mls.setSearchRadius(4.65032);
mls.setUpsamplingMethod(MovingLeastSquares<PointXYZ, PointXYZ>::SAMPLE_LOCAL_PLANE);
mls.setUpsamplingRadius(0.8);
mls.setUpsamplingStepSize(0.4);

// Reconstruct
mls.process(mls_points);
ASSERT_FALSE(mls_points.empty());

for (const auto& mls_point : mls_points)
{
// Check for NaNs in output
EXPECT_TRUE(pcl::isFinite(mls_point));
}
Comment thread
larshg marked this conversation as resolved.
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
TEST (PCL, MovingLeastSquares)
{
Expand Down
Loading