Noise filter tools on spheres

Feel free to ask any question here
Post Reply
seiband
Posts: 4
Joined: Tue Sep 08, 2020 8:27 am

Noise filter tools on spheres

Post by seiband »

Hi!
I'm currently working with point clouds of spheres and have to remove some noise from them in order to improve the sphere fitting quality.
So far I've been using the 'Clean\SOR' tool as well as the 'Clean\Noise' tool.
Which one would be suited better for this task? From my understanding the noise tool might be better for flat surfaces since it is fitting a plane.
One Sphere (r = 2 cm) has like 20000 to 30000 points on the surface. Also, should I adapt the default parameters to use more points for noise cleaning?.

Thanks for your attention.
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: Noise filter tools on spheres

Post by WargodHernandez »

Are there multiple spheres in the same point cloud that you are trying to extract? Is this one cloud per sphere and your trying to get the fitting more accurate? Which version of CC are you running (there have been a few bug fixes over the years for sphere fitting)? Are you using 'Tools\Fit\Sphere' or the RANSAC plugin for spheres?

Both SOR and Noise filters can work on K nearest neighbors, and the noise filter can also be used with a specified radius (this radius is not related to your scanned spheres radii).

I usually use RANSAC to find the general location of each of my scanned spheres and then do a local refinement if required. The local refinement is taking the original point cloud and cropping it to approx 130% size of the sphere I want to refine centered on the location RANSAC found, and then using an iterative procedure (Fit Sphere, toss out points outside some distance from the found sphere, fit Sphere, toss, fit, toss, etc) and I do that until I have an RMS error value which I am expecting or if I can no longer 'see' a normal distribution of distances of points to fitted sphere. I do this programmatically for critical spheres and it can repeat that iterative process hundreds of times, but I will sometimes do it by hand a couple of times if I'm just trying to do better than the basics
daniel
Site Admin
Posts: 7710
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Noise filter tools on spheres

Post by daniel »

Actually, both the SOR and Noise tools work the same indeed. The second one gives you more control but you have to set more parameters!

And mind that the "Fit > Sphere" tool of CloudCompare also relies on a RANSAC sphere fitting algorithm that can cope with a quite great deal of noise already (50% outliers by default, and 0.99 confidence). But your cloud should represent a single sphere indeed.
Daniel, CloudCompare admin
seiband
Posts: 4
Joined: Tue Sep 08, 2020 8:27 am

Re: Noise filter tools on spheres

Post by seiband »

I want to determine the measuring error of a 3D camera and therefore eliminate the noise that doesn't "belong" to the sphere.
The whole process is:
  • Generate Point Cloud
  • Crop cloud to only keep the sphere
  • Apply noise filter
  • Fit sphere
  • Compute features like cloud2sphere distance, etc.
Since I need stable results without any noise I'm using the following approach for fitting the spheres:
https://jekel.me/2015/Least-Squares-Sphere-Fit/

Using Ransac to find the general location with further optimization seems like a very nice idea ;)

It also seems like I found a bug in the noise filter implementation? The extracted neighbourdhoods don't seem to be the right ones:
https://github.com/CloudCompare/CCCoreLib/issues/58
Post Reply