davidcaron / pye57

Read and write e57 point clouds from Python
MIT License
68 stars 42 forks source link

Read Directly into Numpy Array #33

Closed oguzhanilter closed 3 weeks ago

oguzhanilter commented 1 year ago

Hi,

Is it possible to read the specified fields ( cartesianX, cartesianY, colorRed) directly into numpy arrays without creating a dictionary?

The reason: when the data is converted to numpy arrays, it is copied. For large point clouds, it is an issue due to the fact that the memory usage is doubled at the peak.

Thank you in advance

Liquidmasl commented 1 year ago

Is it possible to read the specified fields ( cartesianX, cartesianY, colorRed) directly into numpy arrays without creating a dictionary?

afaik np arrays are immutable, so appending to a np array always creates a copy. sadly.

but some kind of streaming or batching would really be needed. we have 150gb+ point clouds and have a hard time getting it from e57 into another format