GithubHelp home page GithubHelp logo

potreeconverter's Introduction

Potree Converter

The PotreeConverter can transform following file formats into the potree format:

  • las files with XYZ and 2-byte RGB data.
  • ply files with "element vertex" as the first element and x,y,z,r,g,b properties. Subsequent elements will be ignored. xyz must be floats and r,g,b must be uchars. ASCII and binary_little_endian formats are supported.
  • xyz files with either xyzrgb or xyzi data. Specify the type, as well as the range of the data with the -f and -r options.

Windows 64bit binary can be downloaded here: PotreeConverter_2014.04.06

Dependencies

Build

Linux/MacOSX:

mkdir build && cd build
cmake ../
make

Windows:

mkdir build && cd build
#32bit
cmake -G "Visual Studio 11" -T "v110" -DBoost_USE_STATIC_LIBS=ON -DBOOST_ROOT=%BOOST_ROOT% -DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% -DLIBLAS_INCLUDE_DIR=%LIBLAS_INCLUDE_DIR% -DLIBLAS_LIBRARY=%LIBLAS_LIBRARY_DIR%/liblas.lib  ..\

#or 64bit
cmake -G "Visual Studio 11 Win64" -T "v110" -DBoost_USE_STATIC_LIBS=ON -DBOOST_ROOT=%BOOST_ROOT% -DBOOST_LIBRARYDIR=%BOOST_LIBRARYDIR% -DLIBLAS_INCLUDE_DIR=%LIBLAS_INCLUDE_DIR% -DLIBLAS_LIBRARY=%LIBLAS_LIBRARY_DIR%/liblas.lib  ..\

PotreeConverter Usage

Converts las, xyz or ply files to the potree file format.

Options:

-h [ --help ]             prints usage
-o [ --outdir ] arg       output directory
-s [ --spacing ] arg      Distance between points at root level. Distance
                          halves each level.
-l [ --levels ] arg       Number of levels that will be generated. 0: only
                          root, 1: root and its children, ...
-f [ --input-format ] arg Input format. xyz: cartesian coordinates as floats,
                          rgb: colors as numbers, i: intensity as number
-r [ --range ] arg        Range of rgb or intensity.
--source arg              Source file. Can be LAS, PLY or XYZ

Examples:

# convert ply files
./PotreeConverter.exe C:/data.ply -s 0.5 -l 4

# convert las files
./PotreeConverter.exe C:/data.las -s 0.5 -l 4 -o C:/potree_converted

# convert files in the xyzrgb format with rgb between 0 and 255
./PotreeConverter.exe C:/data.xyz -f xyzrgb -r 255

# convert files in the xyzi format with intensity between 0 and 65536
./PotreeConverter.exe C:/data.xyz -f xyzi -r 65536

For example, the stanford bunny data in xyz format looks like this:

-0.0378297 0.12794 0.00447467 0.850855 0.5 
-0.0447794 0.128887 0.00190497 0.900159 0.5 
-0.0680095 0.151244 0.0371953 0.398443 0.5 
-0.00228741 0.13015 0.0232201 0.85268 0.5 	
  • Columns 1-3: xyz
  • Column 4: intensity in range 0-1
  • Column 5: I don't know, will be ignored

xyz values are relatively small, therefore the spacing(-s) has to be small as well.

The command to convert this file into the potree format is:

./PotreeConverter.exe C:/bunny.xyz -f xyzi -r 1 -s 0.02

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.