Skip to main content

Python library for working with 3D point clouds.

Project description

LGTM Code quality Github Actions C.I. Documentation Status https://anaconda.org/conda-forge/pyntcloud/badges/version.svg https://anaconda.org/conda-forge/pyntcloud/badges/platforms.svg https://anaconda.org/conda-forge/pyntcloud/badges/license.svg Launch Binder pyntcloud logo

pyntcloud is a Python 3 library for working with 3D point clouds leveraging the power of the Python scientific stack.

Installation

conda install pyntcloud -c conda-forge

Or:

pip install pyntcloud

Quick Overview

You can access most of pyntcloud’s functionality from its core class: PyntCloud.

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

  • Load a PLY point cloud from disk.

  • Add 3 new scalar 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 in numpy’s NPZ format.

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", n_x=32, n_y=32, n_z=32)

new_cloud = cloud.get_sample("voxelgrid_nearest", voxelgrid_id=voxelgrid_id, as_PyntCloud=True)

new_cloud.to_file("out_file.npz")

Integration with other libraries

pyntcloud offers seamless integration with other 3D processing libraries.

You can create / convert PyntCloud instances from / to many 3D processing libraries using the from_instance / to_instance methods:

import open3d as o3d
from pyntcloud import PyntCloud

# FROM Open3D
original_triangle_mesh = o3d.io.read_triangle_mesh("diamond.ply")
cloud = PyntCloud.from_instance("open3d", original_triangle_mesh)

# TO Open3D
cloud = PyntCloud.from_file("diamond.ply")
converted_triangle_mesh = cloud.to_instance("open3d", mesh=True)  # mesh=True by default
import pyvista as pv
from pyntcloud import PyntCloud

# FROM PyVista
original_point_cloud = pv.read("diamond.ply")
cloud = PyntCloud.from_instance("pyvista", original_point_cloud)

# TO PyVista
cloud = PyntCloud.from_file("diamond.ply")
converted_triangle_mesh = cloud.to_instance("pyvista", mesh=True)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyntcloud-0.1.2.tar.gz (1.8 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyntcloud-0.1.2-py3-none-any.whl (343.7 kB view details)

Uploaded Python 3

File details

Details for the file pyntcloud-0.1.2.tar.gz.

File metadata

  • Download URL: pyntcloud-0.1.2.tar.gz
  • Upload date:
  • Size: 1.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for pyntcloud-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bb79f35777233e277d86c4ff95db704ef09b6b3fcc662d5c04612e83ac19492a
MD5 7d9ee0e8803ac1451a059b8fb6c54533
BLAKE2b-256 3fe20180cad343acda234724190e618db08ce864ec502e22f80d0197dd485abf

See more details on using hashes here.

File details

Details for the file pyntcloud-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pyntcloud-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 343.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for pyntcloud-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1b382694571d9b885c0d3b50434d2bd873682267c1ec418b1b7371232908d616
MD5 291d4abb512cff1a7b846737d9871a50
BLAKE2b-256 24a0b2b2a44659e75ad56e537d10ae2b66aee0f653649f6972b3f2af792a50d3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page