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 Color images and depth images which are taken at the same angle #2538

Closed
Xue21 opened this issue Nov 9, 2022 · 9 comments
Closed
Labels

Comments

@Xue21
Copy link

Xue21 commented Nov 9, 2022

How cam I get the color and the depth image at the same time? I want the Color images and depth images which are taken at the same angle.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Nov 9, 2022

Hi @Xue21 Are you aiming to publish both depth and color streams in the RealSense ROS wrapper, please? Or are you using the librealsense SDK?

@Xue21
Copy link
Author

Xue21 commented Nov 9, 2022

Hi@MartyG-RealSense I am using the librealsense SDK, and I do not want to turn on the laser.

@MartyG-RealSense
Copy link
Collaborator

Thanks very much for the confirmation. Are you using C++ or Python language?

@Xue21
Copy link
Author

Xue21 commented Nov 9, 2022

Hi@MartyG-RealSense I am using Python

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Nov 9, 2022

The pre-made librealsense Python example program opencv_viewer_example.py may provide what you are aiming to achieve if you wish to display separate depth and color images.

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

image

If you wish to align depth and color together into a single combined image then the example program align_depth2color.py could be used.

https://github.com/IntelRealSense/librealsense/blob/master/wrappers/python/examples/align-depth2color.py

image

@Xue21
Copy link
Author

Xue21 commented Nov 9, 2022

Hi@MartyG-RealSense, Thanks very much.How can I save it as images or mp4?

@MartyG-RealSense
Copy link
Collaborator

A Python script at IntelRealSense/librealsense#2731 (comment) saves depth and color into .avi video files.

A RealSense user at IntelRealSense/librealsense#3658 shared an adaptation of align_depth2py they created that saves depth and color as .png images.

A couple of other Python approaches to exporting depth and color as .png images are at IntelRealSense/librealsense#9448 (comment)

@Xue21
Copy link
Author

Xue21 commented Nov 9, 2022

Hi@MartyG-RealSense,Thanks very much!

@MartyG-RealSense
Copy link
Collaborator

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

@Xue21 Xue21 closed this as completed Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants