Giter Site home page Giter Site logo

hough3d's Introduction

Iterative Hough Transform for 3D Line Detection

This code implements the algorithm described in (cited as "IPOL paper" below):

C. Dalitz, T. Schramke, M. Jeltsch: "Iterative Hough Transform for Line Detection in 3D Point Clouds." IPOL, 2017 http://www.ipol.im/pub/art/2017/208/

Source Files

hough3dlines.cpp Main program that implements Algotirhm 1 (Iterative Hough Transform) of the IPOL paper

hough.[h|cpp] Class implementing Algorithm 2 (Hough Transform) of the IPOL paper

sphere.[h|cpp] Class implementating the direction discretization as described in section 2.2 of the IPOL paper

vector3d.[h|cpp] Class for a 3D point with common math operations

pointcloud.[h|cpp] Class for a set of 3D points

Installation

The source code is written in C++ and thus requires a C++ compiler. Moreover, it needs the external library libeigen 3.x, available from http://eigen.tuxfamily.org/.

For compilation with the provided Makefile, three adaptions to your environment might be necessary:

  • set CC to your C++ compiler
  • set LIBEIGEN to the path to your libeigen headers
  • define WEBDEMO for the online-demo version

The last option is only meant for the IPOL online demo and is not recommended for production use because it will stop the program when the Hough space becomes too large or when the input point cloud has more than 10^6 points.

To compile the program, simply type "make". To test it on the test data, type "make test".

Usage

hough3dlines without any or with an unknown option (e.g. "-?") will print the following usage message:

Usage: hough3dlines [options] Options (defaults in brackets): -o write results to [stdout] -dx step width in x'y'-plane [0] when =0, it is set to 1/64 of total width -nlines maximum number of lines returned [0] when =0, all lines are returned -minvotes only lines with at least points are returned [0] -gnuplot print result as a gnuplot command -raw print plot data in easily machine-parsable format -v be verbose and print Hough space size to stdout -vv be even more verbose and print Hough lines (before LSQ)

Input

The input format is described in section 5 of the IPOL paper. The input file must contain the point coordinates, one point per line with x,y, and z separated by commas. Lines starting with a hash (#) are ignored. Example:

point cloud data from a wondrous experiment

41.7201,138.2140,-648.0000 0.0001,-138.2140,-440.0000 2.4543,-136.8650,-436.8000

Output

The output is printed to stdout unless it is redirected to a file with the option "-o". The standard output format is described in section 5 of the IPOL paper. It lists the detected lines one per line with the number of points and the parameters a and b, as in the following example:

npoints=58, a=(2.5682,-123.8986,0.3456), b=(0.0000,0.7071,0.7071) npoints=32, a=(-2.4576,34.8665,0.0000), b=(0.7071,0.0000,0.7071) npoints=3, a=(7.0056,-12.7867,8.5634), b=(0.5773,0.5773,0.5773)

There are two other optional output formats that can be useful for visualization of teh result:

  1. The option "-gnuplot" can be used to immediately visualize the result by piping the program output to gnuplot, as in the following example:

    hough3dlines testdata.dat -dx 0.4 -gnuplot | gnuplot -persist

  2. The option "-raw" prints the plot data in an easily machine-readable format as space separated values that can be used to automatically construct a plotting comand. The numbers have the following meaning:

    minX maxX minY maxY minZ maxZ paramMin paramMax aX aY aZ bX bY bZ npoints

    where the first line specifies the point cloud bounding box, the second line the range of t values in the line parametrization a + t*b, and the following lines list the line parameters with one line per line.

Authors & Copyright

Christoph Dalitz, Tilman Schramke, Manuel Jeltsch, 2017 Institute for Pattern Recognition Niederrehin University of Applied Sciences Krefeld, Germany

License

This code is provided under a BSD-style license. See the file LICENSE-BSD2 for details.

hough3d's People

Contributors

pbutti 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.