Skip to main content

Point Cloud Converter

Project description

longmao-point-cloud-converter

点云文件转换工具类(pcd,pot)

安装

.. code-block:: Python

pip install npccp

使用

.. code-block:: python

import npccp

############ 工具类
## 1. pcd格式转换(ascii,binary,binary_compressed)
npccp.pcdtopcd(sourcePcd, targetPcd, targetDataType)
## 2. pcd转pot(只转换x,y,z,intensity)
npccp.pcdtopot(pcd, pot)

############ 自行封装
## 1. pcd读
with PcdReader(pcd) as reader:
    header = reader.getHeader()
    while True:
        point = reader.getPoint()
        if point is None:
            break
        print(point)
## 2. pcd写
header = PcdXyziHeader()
header.data = PcdHeader.DATA_TYPE_ASCII
with PcdWriter(target, header) as writer:
    point = [x,y,z,i]
    writer.write(point) ## 循环写点

## 3. pot写
with PotreeWriter(pot) as writer:
    point = npccp.new_potree_point(x, y, z, intensity, r, g, b)
    writer.write(point) ## 循环写点

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

npccp-0.1.3.tar.gz (17.3 kB view details)

Uploaded Source

File details

Details for the file npccp-0.1.3.tar.gz.

File metadata

  • Download URL: npccp-0.1.3.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for npccp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 205ed1a4cd3062e6591d5b46f39b4e0405fb600fc6e29827f5d079f0c6d702f1
MD5 6510c0baa23ce13a5729abb36cc516c8
BLAKE2b-256 63912f6600aa29e83b818280653461cf43a2ffb0671a52c8db6d85a772c680c3

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