NormalEstimations always vertical

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

NormalEstimations always vertical

loganbyers
This post was updated on .
I am running pcl 1.8 and having trouble getting correct cloud normals from PointXYZ. The resultant normals are always vertical (within floating point error, probably). The curvature is consistently 0. Attached is a sample point cloud and the script I am using for normal estimation. I have tried many point clouds and radii, but keep experiencing the same problem. My method is very similar to that of the example in the docs. Is there an obvious reason why my normal estimation is not performing?



Thanks in advance

EDIT: I have tried the normal_estimation.cpp tool that is provided with PCL and get similarly bad results.



0620_tiny_xyz.pcd
xyz_to_normal.cpp
CMakeLists.txt

Reply | Threaded
Open this post in threaded view
|

Re: NormalEstimations always vertical

loganbyers
This post was updated on .
I have some updates, which might prove useful in finding the source of the error.
I have tried a normal calculation on single individual points using pcl::computePointNormal and am getting the same result -- the normal is consistently vertical (first image).
I then made a local transform to put the points near the origin <0,0,0> rather than far out in space ~<536000, 7358000, 115> and I get the correct normals (second image).

I have also looked around GitHub and found the following two items that are related to this problem. It is a problem with the RANSAC plane fitting from point covariances.
https://github.com/PointCloudLibrary/pcl/pull/1407
https://github.com/PointCloudLibrary/pcl/issues/560

So the translation towards the origin gives me a solution for now, though it remains an undesirable one. Hopefully the solution suggested by gcasey on GitHub can be pulled into the trunk soon (pull 1407).

Thanks

Bad normal when points are far from the origin


Good normal when points are close to the origin
good_normal_zero_translated.png border="0"/>



EDIT: Inserted images rather than embed as links
Reply | Threaded
Open this post in threaded view
|

Re: NormalEstimations always vertical

Jochen Sprickerhof
Administrator
Hi,

please use the pcl-users mailing list:

http://www.pointclouds.org/contact.html

This list is for PCL development.

Cheers Jochen

_______________________________________________
PCL-developers mailing list
[hidden email]
http://pointclouds.org/mailman/listinfo/pcl-developers
http://pointclouds.org

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NormalEstimations always vertical

raph
Hi,

Although Jochen says the thread belong to the user mailing list I'd like to say I had the same issue.
With large coordinates (500000+), normal estimation is just wrong.

I suspect something goes bad in the kdtree due to floating precision.


Logan, would you be so kind to report the issue here?

Cheers
Raph