Skip to content
Snippets Groups Projects
Commit 91383b50 authored by Bocska Karina's avatar Bocska Karina
Browse files

raktar regenerated

parent aacd2217
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
#include <pcl/filters/voxel_grid.h>
#include <pcl/io/ply_io.h>
inline void voxelGridFilter(std::string plyFilePath) {
inline void voxelGridFilter(std::string plyFilePath, float leafSize) {
// load ply file
pcl::PCLPointCloud2::Ptr cloud(new pcl::PCLPointCloud2());
pcl::io::loadPLYFile("../pointClouds/" + plyFilePath, *cloud);
......@@ -17,7 +17,7 @@ inline void voxelGridFilter(std::string plyFilePath) {
pcl::PCLPointCloud2::Ptr outputCloud(new pcl::PCLPointCloud2());
pcl::VoxelGrid<pcl::PCLPointCloud2> voxelGrid;
voxelGrid.setInputCloud(cloud);
voxelGrid.setLeafSize(0.06f, 0.06f, 0.06f);
voxelGrid.setLeafSize(leafSize, leafSize, leafSize);
voxelGrid.filter(*outputCloud);
std::cout << "Finished filtering point cloud with "
......
......@@ -3,9 +3,9 @@
int main() {
// 1st reduce file size
// voxelGridFilter("trafo.ply");
voxelGridFilter("raktar.ply", 0.08f);
// 2nd write obj file with tetrahedrons
createTetrahedronModel("downsampled_trafo.ply");
createTetrahedronModel("downsampled_raktar.ply");
return 0;
}
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment