I want to use the ransac algorithm to segment the ground plane lidar rings, I use the python-pcl to do that, but I got the false results as the pictures showed below.
As we known, the lidar data has many rings of the ground plane, it can't find the right plane of the ground, but it found the plane above the ground. The reason I can guess is that maybe the ground of lidar is very sparse, and the plane above the ground has the points numbers more than the ground, so the algorithm find the false results. The code can be list as below:
seg = point_cloud.make_segmenter()
seg.set_optimize_coefficients(True)
seg.set_model_type(pcl.SACMODEL_PLANE)
seg.set_method_type(pcl.SAC_RANSAC)
seg.set_distance_threshold(0.1)
indices, model = seg.segment()
It's uncertain whether is the problem I guessed, so if anyone met the problem before, please tell me. And I don't know how to solve the problem, there is few information about the lidar rings segmentation, does anyone know how to solve it?
And is there other methods to do the lidar ground segmentation which I can get the code?