isl-org / isl-org/Open3D

Could you maybe develop a function that could read XYZI format point could file

Open
#2,335 1 comment 1 reaction 3 assignees Claimed by @ssheorey View on GitHub
feature request io
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

Dear developers:

Could you maybe develop a function that could read XYZI format file. A typical XYZI format file would be similar to the one I attached.
[DOTX182013031901004142612.log](https://github.com/intel-isl/Open3D/files/5221691/DOTX182013031901004142612.log)

currently, I'm using the following code to read and visualize this type of file.

```

import open3d as o3d
import numpy as np
import os
import sys
import struct
size_float = 4
list_pcd = []
with open ("C:\\Users\\wilso\\python\\datasets\\DOTX182013031901004142612.log", "rb") as f:
byte = f.read(size_float*4)
while byte:
x,y,z,intensity = struct.unpack(">ffff", byte)
list_pcd.append([x, y, z])
byte = f.read(size_float*4)
np_pcd = np.asarray(list_pcd)
pcd = o3d.geometry.PointCloud()
v3d = o3d.utility.Vector3dVector
pcd.points = v3d(np_pcd)
o3d.io.write_point_cloud("copy_of_fragment.pcd", pcd)
pcd = o3d.io.read_point_cloud('C:\\Users\\wilso\\python\\datasets\\copy_of_fragment.pcd')

o3d.visualization.draw_geometries([pcd])
pcd_array=np.asarray(pcd.points)

```
Thanks a lot for your great work and consideration.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.