Giter VIP home page Giter VIP logo

global_l0's Introduction

Global L0 algorithm for regularity-constrained plane fitting

Introduction

We introduce a method based on energy minimization to reconstruct the planes consistent with our constraint model. The proposed algorithm is efficient, easily to understand, and simple to implement. The experimental results show that our algorithm successfully fits planes under high percentages of noise and outliers. This is superior to other state-of-the-art regularity-constrained plane fitting methods in terms of speed and robustness.

The details can be found in the following ISPRS 2020 paper

Citing our work

If you find our works useful in your research, please consider citing:

Comming soon

BibTex

Comming soon

Install & complie

Please directly copy the code into your workspace and compile it with any complier that supports C++11. In addition, we also use the output functions provided by the fmt library, you can refer it by the link: fmt: A modern formatting library

Sample usage:

First, we construct a extractor, specifying the value of k_neighbors, min_support_points, n_constraints and outlier_penalty in turn. You can refer the detailed usage of the last two parameters in out paper.

cl::point_cloud::GlobalL0Extractor extractor(15, 50, 3, 1.0);

Then, you can extract the planes through calling on the ExtractPlanes method.

extractor.ExtractPlanes(kd_tree, normals, &planes, &labels);

Where, 'kd_tree' is the input 3D point cloud organized by the KD-Tree. It can be read the points from XYZ file and construct the KD-Tree by calling:

cl::geometry::io::ReadXYZPoints(filename.c_str(), &points);
KDTree<RPoint3D> kd_tree;
kd_tree.SwapPoints(&points);

Given the KD-tree, we can use the PCA method to calculate the normal vector for each point. For example:

Array<RVector3D> normals;
geometry::PCAEstimateNormals(kd_tree, 30, &normals);

It indicates we use 30 nearest neighbors of the current point to estimate its normal vector.

At last, the extracted planes and the labels for all points are stored in the 'planes' and 'labels' variables. Then we can compute the root-mean-square (RMS) of the distance from inliers to the fitting planes mentioned by our paper. The usage is as follows:

// Note! We need to ensure that the 'points' variable is not null.
kd_tree.SwapPoints(&points);
kd_tree.clear();

// Print metrics.
Metric(points, labels, planes);

โ€‹ Please see main.cpp for more details.

The mentioned file 'foam_box.xyz' is also provided in the project.

Comparison

We compare our method to the Efficient RANSAC and Pearl algorithm. You can find the implementation by the following links:

Efficient RANSAC implementation: Efficient RANSAC for Point-Cloud Shape Detection

PEARL implementation: Computer Vision at Waterloo - Code

Sample results.

The first column is the orignal point cloud. The second column is Efficient RANSAC, the third is Pearl and the last is our method. The calculated normals have been mapped on the two-dimensinal space and visualized in the second row.

Contact

Please feel free to leave suggestions or comments to Dr. Lin ([email protected]), or Prof. Wang ([email protected])

global_l0's People

Contributors

yblin avatar

Watchers

 avatar

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.