Skip to content

Instantly share code, notes, and snippets.

@HTLife
Last active December 1, 2020 07:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HTLife/bcf98f24eac68f709ae5a205ca63ffc8 to your computer and use it in GitHub Desktop.
Save HTLife/bcf98f24eac68f709ae5a205ca63ffc8 to your computer and use it in GitHub Desktop.
Double click to open pcd with open3d
sudo apt-get install python3-pip
pip3 install open3d
wget https://gist.githubusercontent.com/HTLife/bcf98f24eac68f709ae5a205ca63ffc8/raw/315bab82d2f485d521c01fcc64f1b3fa15ff4663/open3d.desktop
wget https://gist.githubusercontent.com/HTLife/bcf98f24eac68f709ae5a205ca63ffc8/raw/315bab82d2f485d521c01fcc64f1b3fa15ff4663/view_point_cloud.py
sudo cp open3d.desktop /usr/share/applications
sudo sh -c "echo 'image/x-photo-cd=open3d.desktop' >> /usr/share/applications/defaults.list"
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Terminal=true
Exec=/usr/bin/python3 /usr/bin/view_point_cloud.py %F
Name=OPEN3D_VIEWER
Comment=OPEN3D_VIEWER
# examples/Python/Basic/visualization.py
import numpy as np
import open3d as o3d
import sys
if __name__ == "__main__":
print("file name: " + sys.argv[1])
pcd = o3d.io.read_point_cloud(sys.argv[1])
o3d.visualization.draw_geometries([pcd])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment