MCPcopy Create free account
hub / github.com/darglein/ADOP / PreprocessPointcloud

Function PreprocessPointcloud

src/apps/preprocess_pointcloud.cpp:11–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include "data/SceneData.h"
10
11void PreprocessPointcloud(std::string scene_dir, int dup_factor)
12{
13 auto scene = std::make_shared<SceneData>(scene_dir);
14
15 scene->DuplicatePoints(dup_factor, 1);
16 scene->ComputeRadius();
17 scene->RemoveClosePoints(0.00005);
18 scene->RemoveLonelyPoints(5, 0.02);
19 scene->point_cloud.RemoveDoubles(0.0002);
20 std::cout << "Remaining Points: " << scene->point_cloud.NumVertices() << std::endl;
21
22 scene->point_cloud.ReorderMorton64();
23 scene->point_cloud.RandomBlockShuffle(default_point_block_size);
24 scene->ComputeRadius();
25 scene->Save();
26
27
28 UnifiedModel(scene->point_cloud).Save(scene_dir + "/point_cloud_dup.ply");
29}
30
31
32// The tanks and temples scenes were preprocessed with the following settings:

Callers 1

mainFunction · 0.85

Calls 5

DuplicatePointsMethod · 0.80
ComputeRadiusMethod · 0.80
RemoveClosePointsMethod · 0.80
RemoveLonelyPointsMethod · 0.80
SaveMethod · 0.45

Tested by

no test coverage detected