Replies: 1 comment
-
can it help you ? ` print("Read Redwood dataset") depth_raw = o3d.io.read_image( pcd = o3d.geometry.PointCloud.create_from_rgbd_image( pcd.transform([[1, 0, 0, 0], [0, -1, 0, 0], [0, 0, -1, 0], [0, 0, 0, 1]]) downpcd = pcd.voxel_down_sample(voxel_size=0.05) o3d.visualization.draw_geometries([pcd]) ` |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, i am new in the Open3D world. I need to render a point cloud in a depth image, I have been reviewing and modifying the codes in the examples but it doesn't work for me, it just sends me to a 1x1 image with one channel. Could you help me?
This is the code:
**import numpy as np
import open3d as o3d
import open3d.visualization.rendering as rendering
import open3d.visualization.gui as gui
vis = o3d.visualization.Visualizer()
def imagen(depth):
print("Depth Image: ",depth)
app = gui.Application.instance
app.initialize()
nube="point_cloud_100_80_26.pcd"
pcd = o3d.io.read_point_cloud(nube)
vetana = app.create_window("Prueba ventana", 1280, 720)
#pcd.transform([[1, 0, 0, 0], [0, -1, 0, 0], [0, 0, -1, 0], [0, 0, 0, 1]])
widget3d = gui.SceneWidget()
vetana.add_child(widget3d)
widget3d.scene = rendering.Open3DScene(vetana.renderer)
name = vetana.title
print('Nombre',name)
mat = rendering.MaterialRecord()
mat.shader = "defaultUnlit"
Escalizar a la ventana
mat.point_size = 3 * vetana.scaling
widget3d.scene.add_geometry("Point Cloud", pcd, mat)
Configurar camara, Rota la nube de puntos
bounds = widget3d.scene.bounding_box
center = bounds.get_center()
widget3d.setup_camera(20, bounds, center)
widget3d.look_at(center, center - [0, 0, 3], [0, -1, 0])
vis.poll_events()
vis.update_renderer()
widget3d.rendering.render_to_depth_image(imagen)
#print("Depth_Image",depth)
app.run()**
Beta Was this translation helpful? Give feedback.
All reactions