Hi,
Is there a way to estimate normals for a 2D data (XY plane & *Unorganized point cloud*) . To give a small background the point cloud is formed from Laser scan messages. As per the PCL documentation, it try to fit a plane and estimate the normal but in my case all the points are present in a plane. So is there a way to find the normal lying the same 2D plane. Some thing like fitting a line and finding the norm. There is a question posted on this, way back in 2013 and 2014 but unfortunately they still remained unanswered. Any help would be greatly appreciated. Thank you. -- Sent from: http://www.pcl-users.org/ _______________________________________________ [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users |
If your data points are lying in a plane, all vertices have the same normal, which is the normal to the plane. Or am I missing something ?
-----Original Message----- From: PCL-users [mailto:[hidden email]] On Behalf Of BhanuKiran Sent: Thursday, March 1, 2018 2:21 PM To: [hidden email] Subject: [PCL-users] NormalEstimation for 2D points. Hi, Is there a way to estimate normals for a 2D data (XY plane & *Unorganized point cloud*) . To give a small background the point cloud is formed from Laser scan messages. As per the PCL documentation, it try to fit a plane and estimate the normal but in my case all the points are present in a plane. So is there a way to find the normal lying the same 2D plane. Some thing like fitting a line and finding the norm. There is a question posted on this, way back in 2013 and 2014 but unfortunately they still remained unanswered. Any help would be greatly appreciated. Thank you. -- Sent from: http://www.pcl-users.org/ _______________________________________________ [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users --- This email has been checked for viruses by AVG. http://www.avg.com _______________________________________________ [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users |
Yes you are right, its giving me normal vectors pointing in Z-direction. But
I am looking for a method that consider few neighboring points, fit a line and then find a norm. Obviously there can be infinite norm to a line segment. I want to find the norm lying in the XY plane. <http://www.pcl-users.org/file/t499247/norm.png> Links to the previous discussion Previous Discussoin_1 <http://www.pcl-users.org/NormalEstimation-for-2D-points-td4045751.html> Previous discussion_2 <http://www.pcl-users.org/NormalEstimation-for-2D-points-td4045751.html#a4045752> -- Sent from: http://www.pcl-users.org/ _______________________________________________ [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users |
I see. If your plane is not a coordinate plane, you shoud make it such by a
suitable rotation, so that your coordinates become truly 2D. Then as you said, you can fit a line to the K nearest neighbors of every point (using a 2D-tree), and the line direction is orthogonal to the normal. Use total least squares and choose the direction corresponding to the largest Eigenvalue of the correlation matrix. -- Sent from: http://www.pcl-users.org/ _______________________________________________ [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users |
In reply to this post by BhanuKiran
Another option, possibly more robust, is to turn your points in a simple
polygon by means of a 2D concave hull algorithm. Then the normal at a vertex can be taken to be a bissector of the angle formed by the preceding and succeeding vertices, or the line to the center of the circumcircle of the three points. (If you rotated the plane to 2D, unrotate it after normal computation.) -- Sent from: http://www.pcl-users.org/ _______________________________________________ [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users |
Free forum by Nabble - Resume Templates | Edit this page |