Skip to content

rsasaki0109/npy2pointcloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npy2pointcloud

CI Python 3.10+ License: MIT

Convert Rohbau3D .npy point cloud files to standard formats (PLY, PCD, LAS).

Supported Formats

Format Extension Library Colors Normals Intensity Notes
PLY .ply Open3D Yes Yes -- Binary format, widely supported
PCD .pcd Open3D Yes Yes -- Point Cloud Library native format
LAS .las laspy Yes (16-bit) Yes (extra dims) Yes LAS 1.4, point format 7

Rohbau3D Input Format

Each scene directory contains:

File Shape Description
coord.npy (N, 3) float XYZ coordinates (required)
color.npy (N, 3) uint8 RGB values
intensity.npy (N, 1) float Laser reflectance
normal.npy (N, 3) float Surface normals

Installation

pip install -e .

Usage

Convert a single scene

npy2pointcloud convert -i /path/to/scene -o output.ply -f ply
npy2pointcloud convert -i /path/to/scene -o output.las -f las
npy2pointcloud convert -i /path/to/scene -o output.pcd -f pcd

Show point cloud info

npy2pointcloud info -i /path/to/scene

Example output:

Source:     /data/rohbau3d/scene_001
Points:    10,452,301
XYZ range: x=[-12.345, 45.678]  y=[-8.901, 23.456]  z=[0.123, 15.789]
Colors:    yes
Intensity: yes
Normals:   yes

Batch convert an entire dataset

# Mirror directory structure
npy2pointcloud batch -i /path/to/dataset -o /path/to/output -f ply

# Flatten into a single directory
npy2pointcloud batch -i /path/to/dataset -o /path/to/output -f las --flatten

Python API

from npy2pointcloud.loader import load_scene
from npy2pointcloud.converter import convert

data = load_scene("/path/to/scene")
print(data.summary())

convert(data, "output.ply", "ply")
convert(data, "output.las", "las")
convert(data, "output.pcd", "pcd")

Development

pip install -e .
pip install pytest
pytest tests/ -v

About

Convert Rohbau3D .npy point clouds to PLY/PCD/LAS formats

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages