Skip to main content

A Rust-based Python library for extracting pointpca2 features from Point Clouds.

Project description

PointPCA2 - Python Lib

A seamless Python integration to the Rust implementation of PointPCA2

This project aims to integrate Python to pointpca2-rs, enabling the use of Python's comprehensive data science tools combined to the performance provided by the Rust implementation of PointPCA2.

Setup

From PyPI

pip install pointpca2
# or
python -m pip install pointpca2

From source

  • Prerequisites

    • rustc == 1.77.2
    • anaconda3 >= 23.7.4
  • Build

# Clone this repository
https://github.com/akaTsunemori/pointpca2-pylib.git

# cd into the project folder
cd pointpca2-pylib

# Setup and activate the conda environment
conda env create -f environment.yml
conda activate pointpca2-pylib

# Compile the project into a python module using maturin
maturin develop -r

Usage

import open3d as o3d
import numpy as np
import pointpca2

# Load both reference and test PCs
PC_REF_PATH = "examples/pcs/amphoriskos_vox10.ply"
pc_ref = o3d.io.read_point_cloud(PC_REF_PATH)
points_a, colors_a = np.asarray(pc_ref.points), np.asarray(pc_ref.colors)
PC_TEST_PATH = "examples/pcs/tmc13_amphoriskos_vox10_dec_geom01_text01_octree-predlift.ply"
pc_test = o3d.io.read_point_cloud(PC_TEST_PATH)
points_b, colors_b = np.asarray(pc_test.points), np.asarray(pc_test.colors)

# Compute the features (predictors) through the pointpca2 function
predictors = pointpca2.compute_pointpca2(
    points_a, colors_a, points_b, colors_b, search_size=81, verbose=True
)
print(*predictors)

Contributing

Feel free to open any kind of issues and contributions related to this Python package. Issues related to the Rust implementation should be open on the pointpca2-rs repository.

Acknowledgments

License

GNU GENERAL PUBLIC LICENSE
Version 2, June 1991


GitHub @akaTsunemori

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

pointpca2-0.2.0.tar.gz (6.5 MB view details)

Uploaded Source

Built Distribution

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

pointpca2-0.2.0-cp310-cp310-manylinux_2_35_x86_64.whl (394.5 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.35+ x86-64

File details

Details for the file pointpca2-0.2.0.tar.gz.

File metadata

  • Download URL: pointpca2-0.2.0.tar.gz
  • Upload date:
  • Size: 6.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for pointpca2-0.2.0.tar.gz
Algorithm Hash digest
SHA256 4dd0e510c454753ea8f00e7a260c565c7bedcbe9e69a0e504652ebd2a70210ae
MD5 a8b5aec47e7d26516d4a7fcb2391b8ec
BLAKE2b-256 2580e8a78e0b95c3ae96b5330b0d1c0c2320e1a3d17b0f397677479c3fbb8502

See more details on using hashes here.

File details

Details for the file pointpca2-0.2.0-cp310-cp310-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for pointpca2-0.2.0-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 84dca82b1fbee64c3d300efa379cbac7d2c265feb05e89c3fc13eb82e0b0284f
MD5 365d3254101c4cb3683eea1b66ebea5a
BLAKE2b-256 b0323857b994a165585ece52c77c536bce2cfbf293846466dd57e439391a9bd9

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