-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
[IterativeClosestPoint] Viewpoint information not handled during registration #6279
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
Comments
Hi, thank you for reporting this, and thank you for the pull request. The viewpoint information (that is, |
Thank you for your detailed and patient reply. After reconsidering, I agree that PR #6280 was indeed ill-considered on my part. I will continue thinking and exploring further. Besides that, I still have some questions. Regarding the potential bug you mentioned in pcl::visualizer, do you think the data in a PCD file (i.e., the point cloud data) is represented in world coordinates? I'm not quite sure whether the data represents coordinates in the world coordinate system or in the camera coordinate system (i.e., relative to the viewpoint), and I couldn't find any clear standard on this. The reason I assumed that data is in camera coordinates is because another open-source software, CloudCompare, displays point clouds in a way consistent with pcl::visualizer—that is, it seems to treat the data as relative to the viewpoint, then transforms and displays it accordingly.This is also why I thought the issue was a bug in ICP rather than in the visualizer. I would really appreciate it if you could help clarify this doubt. Thank you! |
Describe the bug
Registration<PointSource, PointTarget, Scalar>::align(PointCloudSource& output)
return wrong registration result when the input 2 point cloud have different viewpoint.Context
Registration<PointSource, PointTarget, Scalar>::align(PointCloudSource& output)
does not take into account the viewpoint differences between the two input point clouds. The returned point cloud's data field is usually consistent with the reference cloud. However, differing viewpoints can lead to significant positional discrepancies when visualized usingpcl::visualizer
, since the visualizer considers the transformation from the camera coordinate system to the world coordinate system based on the viewpoint, whereasicp.align()
does not.Expected behavior
(though not perfectly matched,it seems like a right behaviour)
Current Behavior
To Reproduce
I provide a simple example to reproduce my question
the main part to reproduce the result is the pcd file "bunny.pcd" and "bunnyT.pcd".I cannot directly upload this to github.So I provide google drive link here:https://drive.google.com/file/d/1JxzXIKyi-IC3wjB3d7cJMqlBQNV_3gle/view?usp=drive_link, https://drive.google.com/file/d/1IRVhzo26caWpQKDPQZ2jaR7Y5IrnyKpU/view?usp=drive_link.The key point is that the two PCD files have different "VIEWPOINT" fields. Since they are in ASCII format, you can easily inspect them using any text editor.
Your Environment (please complete the following information):
Possible Solution
1.When performing point cloud registration, if the viewpoints of the two input clouds are different, a warning should be issued to the user.
2. Transform the
data
to the world coordinate system for both point clouds before performing the registration.or align one point cloud's viewpoint with the other by transforming the
data
of one cloud to match the viewpoint of the other.The text was updated successfully, but these errors were encountered: