-
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
Align color frame and depth frame which are not a composite frame #6245
Comments
From the end of your question, I interpret that your situation is that you have a collection of image files (not live camera data) and you want to upload the image files and align depth to color. And you need to do so with Python. Is that correct, please? If so, the discussion in the link below regarding doing depth to color alignment in Python with image files will hopefully be helpful to you. |
It is sort of correct. I can have image files but I also have the ros bag file which means I can start streaming it from it with a pipeline. The issue is that these files are apparently broken so I cannot retrieve a single frame with the color and depth stream. Instead, I have to retrieve to separate frames with a single frame each. They are, however, from the same original frame because there is only a single frame stored in the ros bag file. Yes, I would strongly prefer a solution in Python. I looked at the linked issue. zivsha proposes three solutions:
My hope would be that either I can create a |
The subject of creating framesets manually is discussed in the link below, |
Case closed due to no further comments received. |
Issue Description
I've created a dataset with the Realsense D435. I've stored a single frame with a color and a depth stream in a ros bag file. I've also managed to read from the bag file again and continue processing such as aligning the depth channel and coloring it. This worked on my local PC with Ubuntu.
However, something was wrong with the setup on the actual Windows PC. It still stored a bag file but reading from this ros file with the color and the depth stream enabled never returns from
wait_for_frames
. Same thing happens with polling instead of waiting for a frame. In the realsense viewer, this problem shows as only the depth frame is loading. The color stream appears after a minute or so, before that it's white. I've managed to work around it in python by only enabling one stream and polling for up to 30k times. If this does not work, I re-create the pipeline from the file and try again. This part is not the main issue for now as at least I can get the images from the bag file. Now, my main focus is aligning them.This workaround with polling works. This way, I receive the color frame and the depth frame. Usually, I would align a frame like this
However, due to my workaround, I have two separate frames. Note that they are coming from a regular single frame, and that one was possible to align before storing it as a ros bag file. I have not found a way to either pass both the color and the depth frames to the aligner, or to create a new composite frame from the two. Since I've already taken quite a few pictures, I would really want to process these images. Re-taking them is not possible because it was a one-time situation.
So ultimately, how do I align these two streams?
The text was updated successfully, but these errors were encountered: