1

I am trying to use RANSAC to fit multiple spheres and planes and segment them out of a point cloud so only the spheres are left.

I always just tried random numbers which worked for the spheres but does not work for planes at all. I cant visualize what "how far a point must be from the model to count as an inlier" means. Does that mean the model RANSAC creates with my given thresholds fits for points that fit the created model inside that distance threshold? How would that allow

I also read somewhere that the smaller the threshold the more precise the coefficients, yet when I go even just a bit higher with my threshold (lets say 0.001 to 0.02) RANSAC wont find any spheres anymore. Can someone here help me understand that parameter a bit better?

Nope
  • 53
  • 7
  • 2
    That really depends on the resolution of your point cloud. The value for `setDistanceThreshold` tells RANSAC the maximum distance from the model to a potential inlier point. So the value for `setDistanceThreshold` should be larger than the resolution, but not too large. Going from `1mm` to `2cm` is not just a bit higher, it's 20x. larger. Maybe try 5mm or 1cm, as I said, it really depends on the resolution of your point cloud. – serkan.tuerker Dec 08 '21 at 18:21
  • Ohhh, thanks a lot! That does clear a few things up! – Nope Dec 09 '21 at 00:42

0 Answers0