Coder Social home page Coder Social logo

danieltobon43 / upsamplingcloudpcl Goto Github PK

View Code? Open in Web Editor NEW
26.0 3.0 5.0 513 KB

Upsampling method for an input cloud using mls method of PCL

Home Page: https://raw.githubusercontent.com/danielTobon43/upsamplingCloudPCL/master/example/example.png

CMake 33.62% C++ 66.38%
mls c-plus-plus pcl-library pcl cmake upsampling cmakelists dense ply pcd

upsamplingcloudpcl's Introduction

upsamplingCloudPCL

Upsampling method for an input cloud using MovingLeastSquares method of PCL

Input file structure support

Format Description
.pcd Point Cloud Data file format
.ply Polygon file format
.txt Text file format
.xyz X Y Z Text file format

Output file structure (.pcd)

  • unsampled_cloud.pcd

Example




Command line

Usage: ./upsampling_cloud [options] 

Optional arguments:
-h --help         	shows help message and exits [default: false]
-v --version      	prints version information and exits [default: false]
--cloudfile       	input cloud file [required]
--search-radius   	search radius value [default: 0.03]
--sampling-radius 	sampling radius value [default: 0.005]
--step-size       	step size [default: 0.005]
-o --output-dir   	output dir to save upsampled cloud [default: "-"] (not configured)
-d --display      	display upsampling in the pcl visualizer [default: false]

Dependencies

This projects depends on the Point Cloud Library (it works with version 1.8...1.12.1) and its dependencies.

Package Version Description
VTK 9.0.0 Visualization toolkit
PCL 1.12.1 The Point Cloud Library (PCL)
Eigen 3.7.7 Eigen is a library of template headers for linear algebra
Flann 1.9.1 Fast Library for Approximate Nearest Neighbors
Boost 1.77.0 Provides support for linear algebra, pseudorandom number generation, multithreading
OpenGL 21.2.6 Programming interface for rendering 2D and 3D vector graphics.

Compilation

Compile from source

  1. Download source code
git clone https://github.com/danielTobon43/upsamplingCloudPCL
  1. Create a "build" folder at the top level of the upsamplingCloudPCL
cd upsamplingCloudPCL/ && mkdir build
  1. Compile with CMake
cd build/ && cmake ../ && make

Test

cd /build
./upsampling_cloud --cloudfile <path/to/cloud-file>

Note

You can modify the parameters to obtain better results here

mls.setComputeNormals(true);
mls.setInputCloud(input_cloud);
mls.setSearchMethod(kd_tree);
mls.setSearchRadius(search_radius);
mls.setUpsamplingMethod(pcl::MovingLeastSquares<pcl::PointXYZRGB, pcl::PointXYZRGB>::UpsamplingMethod::SAMPLE_LOCAL_PLANE);
mls.setUpsamplingRadius(sampling_radius);
mls.setUpsamplingStepSize(step_size);
mls.setPolynomialOrder(pol_order);
mls.setSqrGaussParam(gauss_param);// (the square of the search radius works best in general)
mls.setCacheMLSResults(true);//Set whether the mls results should be stored for each point in the input cloud.
mls.setNumberOfThreads(num_threats);

upsamplingcloudpcl's People

Contributors

danieltobon43 avatar dtcmlops avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

upsamplingcloudpcl's Issues

4x upsampling

I was able to perform pcl upsampling. Thank you.

I'd like to do 4x upsampling, have you ever done any related work? How should I set the rate?

setCacheMLSResults || setNumberOfThreads

hi sir, when I try to build with pcl 1.8.1 I get the following errors

error: ‘class pcl::MovingLeastSquares<pcl::PointXYZRGB, pcl::PointXYZRGB>’ has no member named ‘setCacheMLSResults’; did you mean ‘MLSResult’?
     mls.setCacheMLSResults(true);//Set whether the mls results should be stored for each point in the input cloud.

error: ‘class pcl::MovingLeastSquares<pcl::PointXYZRGB, pcl::PointXYZRGB>’ has no member named ‘setNumberOfThreads’
     mls.setNumberOfThreads(num_threats);

do you have any idea?

What is algorithm's fps?

Hi, thank you for the nice work.
I will try your code with real-time pointcloud data at 10fps. Is your code sufficient for this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.