-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i met a problem with d415 creating pointcloud #12521
Comments
depth_image_1 = cv2.applyColorMap(cv2.convertScaleAbs(depth_image_1, alpha=0.25), cv2.COLORMAP_JET) and when i change the alpha , i can get different pointcloud |
Hi @MentalBaka1 Is your pointcloud correct after changing the alpha, please? |
No, it's still wrong . |
There was a Python Open3D case at #12090 where the pointcloud was incorrect. The RealSense user in that particular case found at #12090 (comment) that the problem was with their intrinsics code. Does testing the script at #10894 (comment) produce a more correct pointcloud, please? |
In fact, I want to save the depth map and RGB image at that time when I press the 's' key, and then convert the depth map and RGB image into a point cloud offline. I found that if you do not perform the operation "depth_image_2 = cv2.applyColorMap(cv2.convertScaleAbs(depth_image_2, alpha=0.35), cv2.COLORMAP_JET)", the saved depth map will only be in black and white. Also, changing the alpha allows me to get a different depth map, but the point cloud generated with this depth map is still incorrect, can you give me an example of how to save the depth map correctly.Or could you tell me how to create pointcloud from rgb and depth map. |
This is all my saving code: ctx = rs.context() device_model0 = str(dev0.get_info(rs.camera_info.name)) print(f'device_model0: {device_model0}') print('Config ... ') pipeline_2 = rs.pipeline() Start streaming from both camerasprofile1 = pipeline_1.start(config_1) intr = profile1.get_stream(rs.stream.color).as_video_stream_profile().get_intrinsics()
finally:
|
Oh, I have solved it, saving the depth map in png format is no problem, anyway, thank you very much |
You are very welcome. It's great to hear that you achieved a solution. Thanks very much for the update! |
Hi @MentalBaka1 Do you require further assistance with this case, please? Thanks! |
Case closed due to no further comments received. |
Issue Description
I used d415 to generate a depth map and a color map and aligned them.
my saving code like this:
########################################################
depth_image_1 = np.asanyarray(depth_frame_1.get_data())
color_image_1 = np.asanyarray(color_frame_1.get_data())
# Apply colormap on depth image (image must be converted to 8-bit per pixel first)
depth_image_1 = cv2.applyColorMap(cv2.convertScaleAbs(depth_image_1, alpha=0.5), cv2.COLORMAP_JET)
########################################################
and then i want to use open3d to generate pointcloud from this two pictures.
such as
rgbd_image = o3d.geometry.RGBDImage.create_from_color_and_depth(color_raw, depth_raw, convert_rgb_to_intensity=False)
pcd = o3d.geometry.PointCloud.create_from_rgbd_image(rgbd_image, Intrinsic)
the pointcloud i created is completely wrong.
its seems like this
i think the depth is wrong.
can anybody help me?
The text was updated successfully, but these errors were encountered: