-
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 to Depth produces lossy color image #5030
Comments
@delucr hello, The above serves a specific purpose - allowing 1:1 mapping of depth to color and vice versa. So when a user selects RGB pixel of interest then the SDK will be able to provide the corresponding Depth deterministically with no false positives. While using sheer 2D image manipulations would similarly allow to recalculate an image from a different point of view, it would also introduce fundamental flaws - preserve the pixels for which there is no corresponding depth data, and also introduce artifacts due to occlusion and different perspective, which would undermine the declared purpose. Eventually there are more than one way to "align" images, depending of the use-case requirements. And the above explanation highlights the specific advantage (and also the utility) of the method implemented by the SDK. |
@delucr, do you have any follow ups? |
It was a non-trivial question, you're welcome. |
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)
Issue Description
In following the examples available for using the align function to align the rgb and depth images, all of the examples demonstate aligning depth to color as in:
align_to = realsense.stream.color;
alignedFs = realsense.align(align_to);
.....
fs = pipe.wait_for_frames();
aligned_frames = alignedFs.process(fs);
However, if you align color to depth as in:
align_to = realsense.stream.depth;
alignedFs = realsense.align(align_to);
.....
fs = pipe.wait_for_frames();
aligned_frames = alignedFs.process(fs);
The result is a color image that contains holes in it at what appears to be the location of zero depth information. To me this is unexpected. My understanding of what the align function should do is scale, size, and shift the color image as if it was in the depth camera's coordinate system. It appears though that the depth image is being used to filter the color image and therefore drop data from the color image where the depth image has zeros. Using a hole filling filter on the depth before aligning improves the color image but it is sub-standard of what I think align should do.
Please let me know if this is intended functionality or something that can be fixed.
Best regards,
Rich
The text was updated successfully, but these errors were encountered: