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
[visualization] PCLVisualizer::addCorrespondences/updateCorrespondences does not show all correspondences #5749
Comments
Could be a glitch in VTK? since the code in PCL looks correct and seems to work correctly as well - however it fails to visualize on your system. What VTK version do you use? |
VTK seems to be 9.1.0, perhaps I can try a different version here. |
I built PCL and this sample code against VTK 9.2.6 (current release) and it exhibits the same behavior, so seems to be a macos problem. |
I (Ubuntu 23.04, VTK 9.1.0) see the same as Lars. So yes, possibly only a problem on macos. |
It seems that the points on the right just happen to come later in the vector, and VTK here manages only some percentage of the entries … if I limit the display to the last half or last third or so, I see an increasing number of lines on the right being drawn. |
@themightyoarfish I rewrote addCorrespondences as a VTK-only test program: It should display a whole circle (for me it does). You could test what you see, and also what happens when you change |
I tried different orders of magnitude, but I always see the full circle. So the same issue doesn't seem to appear here. |
Describe the bug
I use
Registration::registerVisualizationCallback()
to show correspondences. The code employsPCLVisualizer::addCorrespondences()
. This does not lead to all correspondences getting shown. If instead I iterate over all correspondences manually andaddLine()
for each, all are shown as expected. Somewhere insidePCLVisualizer
, items get lost.Expected behavior
All correspondences passed to
addCorrespondences()
function should be shown.Current Behavior
Not all correspondences passed to
addCorrespondences()
function are shown.To Reproduce
mwe.cpp
CMakeLists.txt
pcds:
pcds.zip
First screenshot is using
updateCorrespondences()
. Notice how on the right there are no correspondences.Second screenshot I add them by hand with
addLine()
. Many correspondences on the right.Your Environment (please complete the following information):
I'm at a loss here. I don't know VTK, but the code in
addCorrespondences()
does not look wrong. I could verify that in https://github.com/PointCloudLibrary/pcl/blob/master/visualization/include/pcl/visualization/impl/pcl_visualizer.hpp#L1259, the full number of found correspondences is iterated, but somehow not everything shows up.This led me on a merry chase as I had first assumed the correspondence estimation to somehow fail, but it seems to be just the visualization.
The text was updated successfully, but these errors were encountered: