-
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
Aligning depth image (and pointcloud) to RGB image is slightly off in the vertical axis #5834
Comments
The first point I would make is to recommend that alignment is performed after the post-processing filters are applied and not before the filters. This is how the RealSense Viewer's point cloud does it. Doing so helps to reduce the distortion effect known as aliasing. It is also a good idea to calibrate the RealSense camera to eliminate that as a possible cause of mis-alignment. The image seems to have particularly severe occlusion (a dark shadow around the body due to the depth and RGB cameras not having the same physical position). I would expect the shadow to be evenly distributed around the body like an outline, but on your image it is though it is pulled horizontally, putting the occlusion on the arm all on one side of it only. I can see it is a horizontal misalignment because the occlusion is correctly level with your waist and shoulders. Please try a calibration first and see if that improves your results. Edit: I note that you mention that you are trying to "align for an external camera". Is one of your streams coming from a separate non-RealSense camera please? If so, the link below may be useful. |
Thanks for your response. I ran the dynamic calibration tool and decided to hold off on the post-processing altogether for now. The images don't seem to be very much improved in terms of the severe occlusion, as this is what it looks like now. (I've put the same images twice horizontally/vertically just to visualize it better) I'm wondering if there's a way to improve this? I might be mistaken but I would also assume that because of the way the D415 is set up there shouldn't have been any alignment needing to happen in the vertical axis as the cameras are in line on that axis? The pointcloud reprojection also isn't working for my external camera but I'm doing that on one static image and it's not included here because I'm just trying to figure out how to align the depth/pointcloud to the D415's RGB first. |
It may be best to use the non-RealSense camera for the RGB stream and the RealSense for the depth stream. This is because the RealSense 400 Series is not interfered with by non-RealSense cameras that are nearby, but RealSense 400 Series does interfere with non-RealSense IR cameras. An example would be a laptop with a built in IR camera being interfered with by a RealSense camera using IR near the laptop. As far as I know, an RGB stream on a non-RealSense camera should be immune to interference. If you are trying also to align depth and RGB in a point cloud on the same camera (D415), there is a method for doing it in the RealSense Viewer. If it looks fine in the Viewer then it would suggest that the issue is in the align script rather than a hardware issue. There is a guide to doing so in the link below. On the page, click Expand Post to see the guide. https://forums.intel.com/s/question/0D70P000006AebbSAC/pixels-mismatch |
Please let us know if further assistance is needed. |
I'm just still not sure why there are data-less pixels at the top of the frame; shouldn't alignment (using rs.align) between the cameras only be happening in the horizontal axis, given the placement of the cameras? I've taken various images while ensuring that there are no nearby IR sources as suggested by MartyG with the same results. On another note, I will try to play around with the filters in order to minimize the horizontal occlusion but if there are any other ways to improve this, please let me know. |
Since our RealSense D4 Processor uses the left IR imager as the reference to generate depth data, it could be helpful to compare Left IR to the RGB image of the same resolution and see the vertical differences, especially when the objects are close. However, it may or may not be what you've been observing. Attachment(s): |
Please let us know if further assistance is needed. Thank you. |
Issue Description
When I run the alignment script, align-depth2color.py, I'm getting an output that looks like this:
However, there's the area at the top of the depth map that, when aligned, is missing. From what I understand with the stereo mapping, any ambiguous areas should lie within the horizontal axis and there shouldn't be any misalignment in the vertical axis?
I'm having trouble with getting the pointcloud reprojection to perfectly align for an external camera, and I want to know if:
For reference, here is my code.
Thanks for the help!
The text was updated successfully, but these errors were encountered: