Reducing the Size of a Cloud with Random Decimation¶
The code reduce the size of a cloud by removing points randomly.
C++¶
#include <eVision/Easy3D/ERandomDecimator.h>
using namespace eVision::Easy3D;
EPointCloud pc;
pc.Load("");
// Explicitly decimate the point cloud to keep 5000 points
ERandomDecimator decimator(5000);
EPointCloud pcDecimated;
decimator.Decimate(pc, pcDecimated);
C#¶
using eVision.Easy3D;
EPointCloud pc = new EPointCloud();
pc.Load("");
// Explicitly decimate the point cloud to keep 5000 points
ERandomDecimator decimator = new ERandomDecimator(5000);
EPointCloud pcDecimated = new EPointCloud();
decimator.Decimate(pc, pcDecimated);
Python¶
from eVision import Easy3D
pc = Easy3D.EPointCloud()
pc.Load("")
# Explicitly decimate the point cloud to keep 5000 points
decimator = Easy3D.ERandomDecimator(5000)
pc_decimated = Easy3D.EPointCloud()
decimator.Decimate(pc, pc_decimated)