pyorbbecsdk icon indicating copy to clipboard operation
pyorbbecsdk copied to clipboard

Point cloud example code dose not work

Open hongsamvo opened this issue 4 months ago • 1 comments

Hi, I am testing camera gemini 336. The point_cloud.py dose not work and I try this code from main branch https://github.com/orbbec/pyorbbecsdk/blob/main/examples/pointcloud_filter_o3d.py, the output is very weird. Does anyone know the problem. Thank you.

https://github.com/user-attachments/assets/bd0f8464-5158-41b6-aeef-851c6b5e6309

hongsamvo avatar Sep 11 '25 08:09 hongsamvo

I try to use this function " pcd = o3d.geometry.PointCloud.create_from_depth_image( depth_o3d, intrinsic, depth_scale=1000.0, depth_trunc=10000.0)" but the result is the same

Image

hongsamvo avatar Sep 12 '25 05:09 hongsamvo

I am having the same issue. I thought the depth.py example works fine but the point cloud example does not work. Has anyone made progress on this?

michael-ceretas avatar Nov 19 '25 07:11 michael-ceretas

Hi, I think it work correctly, but we need set some limit for visualize, MIN_DEPTH = 20 # 20mm MAX_DEPTH = 500 #500 mm, in case open3d, pcd = o3d.geometry.PointCloud.create_from_depth_image( depth=depth_o3d, intrinsic=intrinsic, depth_scale=1., depth_trunc=0.5). In case, using orbec sdk, I use this

 # pcd by orbbec sdk
    point_cloud_filter = PointCloudFilter()
    point_cloud_filter.set_create_point_format(OBFormat.POINT)
    point_cloud_frame = point_cloud_filter.process(frames)
save_point_cloud_to_ply(save_data_path + "pcd.ply", point_cloud_frame)

hongsamvo avatar Nov 19 '25 08:11 hongsamvo

I think you can add some limit range (same with depth.py) in this file https://github.com/orbbec/pyorbbecsdk/blob/v2-main/examples/point_cloud.py

hongsamvo avatar Nov 19 '25 08:11 hongsamvo

Ok great, thanks for that - I will give that a try tomorrow!

michael-ceretas avatar Nov 19 '25 10:11 michael-ceretas