Python .e57文件读取器/写入器
项目描述
pye57
Python对LibE57Format的包装,用于读取和写入.e57点云文件
示例用法
import numpy as np
import pye57
e57 = pye57.E57("e57_file.e57")
# read scan at index 0
data = e57.read_scan(0)
# 'data' is a dictionary with the point types as keys
assert isinstance(data["cartesianX"], np.ndarray)
assert isinstance(data["cartesianY"], np.ndarray)
assert isinstance(data["cartesianZ"], np.ndarray)
# other attributes can be read using:
data = e57.read_scan(0, intensity=True, colors=True, row_column=True)
assert isinstance(data["cartesianX"], np.ndarray)
assert isinstance(data["cartesianY"], np.ndarray)
assert isinstance(data["cartesianZ"], np.ndarray)
assert isinstance(data["intensity"], np.ndarray)
assert isinstance(data["colorRed"], np.ndarray)
assert isinstance(data["colorGreen"], np.ndarray)
assert isinstance(data["colorBlue"], np.ndarray)
assert isinstance(data["rowIndex"], np.ndarray)
assert isinstance(data["columnIndex"], np.ndarray)
# the 'read_scan' method filters points using the 'cartesianInvalidState' field
# if you want to get everything as raw, untransformed data, use:
data_raw = e57.read_scan_raw(0)
# writing is also possible, but only using raw data for now
e57_write = pye57.E57("e57_file_write.e57", mode='w')
e57_write.write_scan_raw(data_raw)
# you can specify a header to copy information from
e57_write.write_scan_raw(data_raw, scan_header=e57.get_header(0))
# the ScanHeader object wraps most of the scan information:
header = e57.get_header(0)
print(header.point_count)
print(header.rotation_matrix)
print(header.translation)
# all the header information can be printed using:
for line in header.pretty_print():
print(line)
# the scan position can be accessed with:
position_scan_0 = e57.scan_position(0)
# the binding is very close to the E57Foundation API
# you can modify the nodes easily from python
imf = e57.image_file
root = imf.root()
data3d = root["data3D"]
scan_0 = data3d[0]
translation_x = scan_0["pose"]["translation"]["x"]
安装
在linux、Windows或Apple Silicon上
python -m pip install pye57
在macOS上带有Intel CPU的情况下,您可以尝试从源代码构建(高级用户)
从源代码构建(供开发者使用)
克隆带有所需子模块的存储库
克隆一个新的存储库,包括libe57Format子模块
git clone https://github.com/davidcaron/pye57.git --recursive
如果存储库已经之前被克隆,但没有使用--recursive标志
cd pye57 # go to the cloned repository
git submodule init # this will initialise the submodules in the repository
git submodule update # this will update the submodules in the repository
Linux上的依赖项
首先安装libxerces-c-dev。
sudo apt install libxerces-c-dev
Windows上的依赖项
要获取xerces-c,您可以尝试从源代码构建或如果您使用conda
conda install -y xerces-c
MacOS上的依赖项
要获取xerces-c,运行
bash ./scripts/install_xerces_c.sh
从存储库源运行pip install
cd pye57
python -m pip install .
卸载
再次使用pip
python -m pip uninstall pye57
项目详情
关闭
pye57-0.4.15.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 4d124c9db9f6d32127ca4418281e04defd9bd1e34098d8da0cd9b7f0503c75c2 |
|
MD5 | 3c5e181313357a767311cb522c491f1a |
|
BLAKE2b-256 | 048cffddc0707b364943ae6e71341cad7b0a7bbbf320de927d0659a79648b85d |
关闭
pye57-0.4.15-cp313-cp313-win_amd64.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 362d394b3dbac976be96b4dae0d94e4caee01e893757b3766415bb0ed9b32248 |
|
MD5 | 231d7a9cce7141389340e632d73bf47b |
|
BLAKE2b-256 | 1a561881d68cedf3940ca9a4dd71d0813e94d3c7e002ddba6ec98b356ce2e46d |
关闭
哈希值 用于 pye57-0.4.15-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 304e15fc625f9106d093a0e82785cb994d59c07c68d50ac9d8ff91b2a364eac4 |
|
MD5 | e80949dead4d314fc298bb3ceed9487c |
|
BLAKE2b-256 | bf642ff710b0ca4db35cf6667282544db1d8adfee201aaa21afa62ba2b42015d |
关闭
哈希值 用于 pye57-0.4.15-cp313-cp313-macosx_11_0_arm64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 2a1d311b9d0971249b7a94b17de6beb8366d9a17502e8c777fe931aa62669e00 |
|
MD5 | 60b93915bc06259ae756909aba6ac275 |
|
BLAKE2b-256 | 8ca455f2574963995547baf81e4fab8947b5b31655c75b24ff2264a1ee669606 |
关闭
哈希值 用于 pye57-0.4.15-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 0bb6cedc89e305f0809d26e49405c19a3e21d0b5503adba9bbd575e5fe57bbcd |
|
MD5 | d873185a89bd1c9378d607c1563d7e29 |
|
BLAKE2b-256 | 04dc1fc6e273c4bd5273fafee4999a128e6eccffa080dc3b2ccf528d36452c6f |
关闭
哈希值 用于 pye57-0.4.15-cp312-cp312-macosx_11_0_arm64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 3bb43f6b102d29ce5a75969889e0fe4194fb365006f4363af69bec92bd0eeb14 |
|
MD5 | 9328937e8e6dbdc7e425e7c15bb5c4ff |
|
BLAKE2b-256 | 64ce14081d3a90dec834ede2175cb9065a9544970a082bd73d1eaa639820b397 |
关闭
哈希值 用于 pye57-0.4.15-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 2cd75de438a8eedbd7b2eff52b6d64394e06afd32a3e57d838540e9fdfbe090e |
|
MD5 | 13af996ab665061698b4ba3cf3297294 |
|
BLAKE2b-256 | 6341bd1fc2e99925d254724bfc92e06c8def2daa30c3d3bf6a47456e59cf8478 |
关闭
哈希值 用于 pye57-0.4.15-cp311-cp311-macosx_11_0_arm64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 5dc59441722614cb8093c71bce49cd518268e81ecf8316631ef0eb72ed6e2ee8 |
|
MD5 | 3d537ceaef6f07711c584f60ce292e4d |
|
BLAKE2b-256 | e70cb274929f12608b4d0bdbdf28f99562ca231fa6282e49e7a544933eece57e |
关闭
哈希值 用于 pye57-0.4.15-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 84d3a0c200ec2190ef6bbb335b847b35f2e7b84f6a4b50c5a416361968c191e2 |
|
MD5 | 5a25d176e9811a77062da55edf4cd1f0 |
|
BLAKE2b-256 | b69b3b8f4da8d71a5fc6f59743521cabbd6049c8e31bf6629e9d9e6fb6662696 |
关闭
哈希值 用于 pye57-0.4.15-cp310-cp310-macosx_11_0_arm64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 8b2b1613420b8194a9e0c6b41234a4bc9571706ab1944e60fb45a0a171c09f12 |
|
MD5 | 7ac6f8127e91cea4672851967c71fb0b |
|
BLAKE2b-256 | f6ea6ba4938d5d13d462251f6fddf6658b1b468368dbc75fc72c1f71f9c44092 |
关闭
哈希值 用于 pye57-0.4.15-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | fe7d47c76cf0a5a26d6f536e9fad681c03ecc5216d0bbf558ed7fcce7e1224b2 |
|
MD5 | ee5b5e079a2606291937b6884f97f6cf |
|
BLAKE2b-256 | f3fbb86a4e1e349307073eed9a15b4b2a108c06ac34fec416cea07811c0893e8 |
关闭
哈希值 用于 pye57-0.4.15-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 74abeb451e0ec2053b5df53267e8334f32482c8467b805ed4f6ba5e85d28a99b |
|
MD5 | 44c3ee9b3edea9f1320435e09cb6f32d |
|
BLAKE2b-256 | 56c6e7b9eb106fb173369934d46d95a4c52611cac7530f55740c76407a2d1264 |