| 9 | #include "data/SceneData.h" |
| 10 | |
| 11 | void 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: |
no test coverage detected