Skip to content

antonmil/pyntcloud

 
 

Repository files navigation

Making point clouds fun again

Travis Build Status

image

pyntcloud is a Python (3, because we are not in 2008) library for working with 3D point clouds.

Documentation

📖 📖

Home
Introduction
Installation                    
PyntCloud
Points
Filters // Filters - Dev
I/O // I/O - Dev
Samplers // Samplers - Dev
Structures // Structures - Dev  

Overview

Concise API

You can access most of pyntcloud's functionallity from it's core class: PyntCloud.

With PyntCloud you can penform complex 3D processing operations with minimum lines of code. For example you can:

  • Load a point cloud from disk.
  • Add 3 new sacalar fields by converting RGB to HSV.
  • Build a grid of voxels from the point cloud.
  • Build a new point cloud keeping only the nearest point to each occupied voxel center.
  • Save the new point cloud.

With the following concise code:

from pyntcloud import PyntCloud

cloud = PyntCloud.from_file("some_file.ply")

cloud.add_scalar_field("hsv")

voxelgrid_id = cloud.add_structure("voxelgrid", x_y_z=[32, 32, 32])

points = cloud.get_sample("voxelgrid_nearest", voxelgrid=voxelgrid_id)

new_cloud = PyntCloud(points)

new_cloud.to_file("out_file.ply")

Lightweigth visualizer ---------------------

Every PyntCloud can be visualized using the plot method.

This will create a stand-alone html visualizer. The cool thing about this is that you can open it in any browser and if you call it from inside a Jupyter Notebook, the visualizer will be embedded as an IFrame:

image

The plot function has many options.

For example you can use any scalar field as color with a custom colormap:

image

Or, if it exists, visualize the mesh associated with the point cloud:

image

General pourpuse

Even though point clouds obtained from different sources present some variance in terms of the kind of information it contains, we encourage a source-agnostic vision of point clouds.

pyntcloud provides tools for source-agnostic 3D processing operations but it also provides building blocks for easily implementing something that covers your specific needs.

Easy to use and extend

Because Python.

About

pyntcloud is a Python library for working with 3D point clouds.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 76.2%
  • JavaScript 17.5%
  • HTML 6.3%