Hello, Daniel,
Using an optical sensor which gives a point cloud with noise, it is interesting to reduce the point cloud to a finite number of representative points. For example, on a sphere, we can define 25 zones and each zone should then be represented by a single point. To do this, we can select 25 points in the sphere point cloud, and all the points with a distance less than for example 2mm are used to fit a local sphere and then a point on the local sphere is determined to represent this zone.
With CC, we can load two point clouds, one for the finite zones with 25 points and the other one represents the captured cloud, the RANSAC plugin can be used to determine the representative points around each point in the former cloud.
Do you have a suggestion on the development of this functionality?
Application of RANSAC locally to determine representative point
Re: Application of RANSAC locally to determine representative point
I guess you can compute the distances between the two clouds (the 25 points being the 'reference' cloud). Then you filter out the points that are farther from this 'finite zones points' based on the distance (with Edit > SF > Filter by Value).
And then you can segment all zones (either manually, or with the 'Extract Connected Components' tool if the areas are disconnected).
Or you can use the RANSAC plugin directly. Or use the 'Tools > Fit > Sphere' on each connected component.
Did I miss something?
And then you can segment all zones (either manually, or with the 'Extract Connected Components' tool if the areas are disconnected).
Or you can use the RANSAC plugin directly. Or use the 'Tools > Fit > Sphere' on each connected component.
Did I miss something?
Daniel, CloudCompare admin
Re: Application of RANSAC locally to determine representative point
Daniel,
Yes, it's a solution and it works.
When you said the 'Extract Connected Components', I think it is more the 'Label Connected Components' in the tool.
One more question, what's the algorithm behind the fitting of planes or spheres int the 'Tools > Fit', is it different from RANSAC?
Thanks for your reply.
Yes, it's a solution and it works.
When you said the 'Extract Connected Components', I think it is more the 'Label Connected Components' in the tool.
One more question, what's the algorithm behind the fitting of planes or spheres int the 'Tools > Fit', is it different from RANSAC?
Thanks for your reply.
Re: Application of RANSAC locally to determine representative point
Yes "Label Connected Components" is the right tool.
And the algorithm are indeed different in the 'Tools > Fit' section. For the plane, it's 'Least Squares' fitting using all the points (while in the RANSAC algorithm it uses randomly picked points). And for the sphere it's a noise robust median of least squares fitting I believe (it's a actually a kind of RANSAC algorithm as well, but more robust and it tries different solutions considering all the points to estimate how well the sphere fits - while once again the RANSAC algorithm fits a sphere on random points). Those algorithms are basically trying to fit a single shape on all the points, while the RANSAC algorithm generates many shapes in a quite random way until almost all points are 'used'.
And the algorithm are indeed different in the 'Tools > Fit' section. For the plane, it's 'Least Squares' fitting using all the points (while in the RANSAC algorithm it uses randomly picked points). And for the sphere it's a noise robust median of least squares fitting I believe (it's a actually a kind of RANSAC algorithm as well, but more robust and it tries different solutions considering all the points to estimate how well the sphere fits - while once again the RANSAC algorithm fits a sphere on random points). Those algorithms are basically trying to fit a single shape on all the points, while the RANSAC algorithm generates many shapes in a quite random way until almost all points are 'used'.
Daniel, CloudCompare admin
Re: Application of RANSAC locally to determine representative point
Now I understand the difference between the whole points fitting and the RANSAC.
However, it seems that CC does this whole points fitting for only plane and sphere shapes, but I am also interested in the cylinder fitting. Do you have some suggestions for the cylinder fitting algorithms?
Best regards
Zilong SHAO
However, it seems that CC does this whole points fitting for only plane and sphere shapes, but I am also interested in the cylinder fitting. Do you have some suggestions for the cylinder fitting algorithms?
Best regards
Zilong SHAO
Re: Application of RANSAC locally to determine representative point
There's currently no algorithm/tool to fit a cylinder on a point cloud in CloudCompare.
Daniel, CloudCompare admin