-
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
upload color and depth images and then align them #1274
Comments
Hi @adarvit , |
You must have the calibration data of the camera that was used to take these images in order to successfully align the images - i.e the intrinsics and extrinsics data. If you have it, please continue to read. I'll just write down what can be done and let me know what you are missing or don't understand... There are a few ways to make what you want happen:
|
Is there a reason you are saving frames to file and not using the |
Thank you for your effort, I have the calibration, i used this code to get it: I had tried the second solution you suggested, using this code: but all of the pixels were out of bound. for example: |
Can you try the following to get the depth scale: (instead of Also - you did not answer my question- was the depth and color images saved as raw binary or using some encoder? if it is the latter - the depth data might be lost or modified |
both |
This is more likely the reason then. The depth data probably contains modified values. which format did you use to save the files? |
tiff |
did you save the frames as |
I'm not very familiar with tiff format, but please try the following:
Let me know if the data is the same, so we can deduce depth data is valid inside the tiff image |
I dont use any compression level, but the depth frames were saved as 8 bit. the data in the csv is in 16 bit pixels and the tiff images were saved as 8 bit so the data is not the same. |
This is an issue, you only saved half the data thus causing the depth values to change, from the image it looks to me like you took the lower bits, so each depth pixel could map to a radius of color pixels. Do you have a way to share how exactly the data was saved/altered so maybe we can come up with some way to help? |
@adarvit , can you upload such 2 files here so we can see what we get? |
Hi, frames = pipeline.wait_for_frames() It's part of cattle's body. It should be smoother: |
[Realsense Customer Engineering Team Comment] |
[Realsense Customer Engineering Team Comment] |
I followed this steps you suggested @zivsha , but as @adarvit at the end I get an image bigger than expected. depth_pixel = [330, 330] but when at the end I expect an image of 848x480 I get one of 1039x581.
|
I've been struggling with the next problem for a few days now:
I have a color image and a corresponding depth image that are not aligned, i took them with RS300 (I've attached an example)
I am wondering if there is a way to upload those images and map the depth image to the color one using librealsense with python.
I know align.process get live stream frames, so i wonder if i can use it with uploaded frames
I would be happy to solve this problem because I have a database of such images that would be a problem for me to take again
Thanks in advance
The text was updated successfully, but these errors were encountered: