Avoid distortion when inserting a rectangle into a point cloud using plane equation

Viewed 92

I have a set of different point clouds, from each of which I find the plane with the largest supponrt and get the plane equation (ax + by + cz + d = 0)

Using the plane equation, I am trying to insert a plane into each of the point clouds, which I manage to do. The problem is the distortion of said plane. How can I insert a plane that has a rectangular form?

This is how I am inserting the plane on each of the point clouds:

  • I first find the min/max value for the x and y, so the plane is proportional to the point cloud size and intersects it.

  • I multiply the min by 10 and divide x and y by 10 to increase the density of the inserted plane

      min = np.min(point_cloud, axis=0)
      max = np.max(point_cloud, axis=0)
    
      for i in range (int(min[0] * 10), int(max[0]* 10)):
          for j in  range (int(min[1]* 10), int(max[1]* 10)):
              x = i/10
              y = j/10
              z = (-d1 - a1*x - b1*y)/c1
              plane.append([x, y, z])
    

plane 1

Plane 2

Plane3

And here is a gif showing different angles of the different point clouds with the plane inserted

Gif Any guidance or literature where I could understand/learn how to fix this?

I think the problem is the way I am calculating z, because when I set z to a fixed number (e.g. 10), the plane has a rectangle form, without distortion. But of course, it doesn't intersect the point cloud.

This is an example of that:

Plane 4

Thanks

0 Answers
Related