Skip to content
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

How to get textured point cloud? #9005

Closed
JimXu1989 opened this issue May 12, 2021 · 4 comments
Closed

How to get textured point cloud? #9005

JimXu1989 opened this issue May 12, 2021 · 4 comments

Comments

@JimXu1989
Copy link

JimXu1989 commented May 12, 2021

Required Info
Camera Model { D400 }
Firmware Version (Open RealSense Viewer --> Click info)
Operating System & Version { Linux (Ubuntu 20.04)
Kernel Version (Linux Only) (e.g. 4.14.13)
Platform PC
SDK Version { legacy / 2.<45>.<?> }
Language {python}

Issue Description

How to get textured point cloud? Texture form color image.
the comment says: We'll use the colorizer to generate texture for our PLY
(alternatively, texture can be obtained from color or infrared stream)

colorizer = rs.colorizer()

try:
# Wait for the next set of frames from the camera
frames = pipe.wait_for_frames()
color_frame = frames.get_color_frame()
colorized = colorizer.process(frames)

# Create save_to_ply object
ply = rs.save_to_ply("1.ply")
@MartyG-RealSense
Copy link
Collaborator

Hi @JimXu1989 As you quote "We'll use the colorizer to generate texture for our PLY", it sounds as though you are referring to the SDK Python example program export_ply_example.

https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/export_ply_example.py

Historically, there have been difficulties in past cases with exporting color to a ply using Python.

The case below has Python scripting shared by a RealSense user whose code exported color to a ply, though without vertex normals. If lack of normals is not a problem for you then the script may be helpful if it works for you. It uses the export_to_ply export method instead of save_to_ply.

#6194 (comment)

@JimXu1989
Copy link
Author

Hi @JimXu1989 As you quote "We'll use the colorizer to generate texture for our PLY", it sounds as though you are referring to the SDK Python example program export_ply_example.

https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/export_ply_example.py

Historically, there have been difficulties in past cases with exporting color to a ply using Python.

The case below has Python scripting shared by a RealSense user whose code exported color to a ply, though without vertex normals. If lack of normals is not a problem for you then the script may be helpful if it works for you. It uses the export_to_ply export method instead of save_to_ply.

#6194 (comment)

Thanks a lot for your reply

@MartyG-RealSense
Copy link
Collaborator

Hi @JimXu1989 Do you require further assistance with this case, please? Thanks!

@MartyG-RealSense
Copy link
Collaborator

Case closed due to no further comments received.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants