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

Align depth to color from saved images #8756

Closed
Todibo99 opened this issue Apr 6, 2021 · 4 comments
Closed

Align depth to color from saved images #8756

Todibo99 opened this issue Apr 6, 2021 · 4 comments

Comments

@Todibo99
Copy link

Todibo99 commented Apr 6, 2021


Required Info
Camera Model { D415 / D435 }
Operating System & Version {Ubuntu 18}
Kernel Version (Linux Only) (e.g. 4.14.13)
Platform PC
Language {python }

Issue Description

Hi,
I have some saved color and depth images from D415 and D435. I would like to align depth to color. However, the pyrealsense2.align API requires a composite frame as input. I am wondering is there a way to restore frames from saved images or do you have any other suggestions?

Thanks!

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Apr 6, 2021

Hi @Todibo99 When a depth frame is saved to PNG, most of the depth information is lost. It is therefore recommended to save depth to a format that preserves the depth information, such as a .raw image.

The link below features a Python script by a RealSense user that took the approach of aligning PNG color frames and an .npy file of the depth as an array of scaled matrices.

#4934 (comment)

An approach to the composite frame issue may be to manually create a custom frameset using software_device or a custom processing block.

#5847

Information about software_device can be found in the documentation of the SDK's C++ example program for it.

https://github.com/IntelRealSense/librealsense/tree/master/examples/software-device

The number of references available for using software_device with Python are more limited, though the link below may be helpful.

#4197

@Todibo99
Copy link
Author

thx, i have sorted it out

@MartyG-RealSense
Copy link
Collaborator

Great to hear, @Todibo99 - thanks for the update!

@MartyG-RealSense
Copy link
Collaborator

Case closed due to solution achieved and 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