daavoo / pyntcloud

pyntcloud is a Python library for working with 3D point clouds.
http://pyntcloud.readthedocs.io
MIT License
1.4k stars 223 forks source link

save view as Image #284

Closed Dource closed 4 years ago

Dource commented 4 years ago

Is your feature request related to a problem? Please describe. Hello, I have a PointCLoud object that I would like to save as an image. The pictures serve my CNN as input. The Images For this I have the following code:

`import os import matplotlib.p import pyntcloud from pyntcloud import PyntCloud

Path to CropedPoinCloud

path_incloud = r"C:\Users\RoosDan\Documents\Python\Dateien\testOutputs" file_names = os.listdir(path_incloud) print(file_names)

for file_name in file_names:

Read PointCloud from path

file_path = os.path.join(path_incloud,file_name) cloud = PyntCloud.from_file(file_path) cloud.plot(backend="matplotlib", initial_point_size=5,elev=45, azim=45) print(type(img)) print(img)`

Right now I'm a little desperate because I don't know how to save the view. What I want is, in principle:

plt.savefig()

I dont want you guys to do all the work. A push in the right direction would be awesome.

Describe the solution you'd like Save plot as Image from view.