isl-org / Open3D

Open3D: A Modern Library for 3D Data Processing
http://www.open3d.org
Other
11.09k stars 2.26k forks source link

There are many holes in the Bunny data using the ball pivoting #1887

Open q-chen95 opened 4 years ago

q-chen95 commented 4 years ago

hi, i meet some problems in the Bunny data using the ball pivoting, here my code:

knn_normal = 30 pcd.estimate_normals(search_param=o3d.geometry.KDTreeSearchParamKNN(knn=knn_normal), fast_normal_computation=False) radii = [0.006, 0.008, 0.01, 0.012] rec_mesh = o3d.geometry.TriangleMesh.create_from_point_cloud_ball_pivoting( pcd, o3d.utility.DoubleVector(radii)) o3d.visualization.draw_geometries([rec_mesh], mesh_show_back_face=True) image

i think it may be due to faulty normals, but i tried several parameters and the results not good

griegler commented 4 years ago

The problem is that the normals from estimate_normals are note oriented (sometimes they point inwards, sometimes outwards). #1641, #1151

jokrox commented 4 years ago

I have the same problem. But the normals of my pcd are pointing in the same direction. Do you have any idea what it could be?

        distances = pcd.compute_nearest_neighbor_distance()
        avg_dist = np.mean(distances)
        factor = 1.5
        radius = factor * avg_dist   
        radi =  o3d.utility.DoubleVector([radius, radius * 2])
        mesh = o3d.geometry.TriangleMesh.create_from_point_cloud_ball_pivoting(pcd, radi)
Bildschirmfoto 2020-05-27 um 12 20 44 Bildschirmfoto 2020-05-27 um 12 20 08
anmakon commented 3 years ago

Hi,

are there any updates on this problem? I do have a similar issue.

Setup description: I have a mug lying on a table and take a depth image from an overhead camera. I reproject the points from the depth image into a pcd. The points at the table plane are evenly spaced and I set all point normals pointing upwards and being perpendicular to the table. The resulting pcd and the normals can be seen below.

Problem description: I run the ball pivoting algorithm and the results shows several triangles in a pattern missing on the table plane. This problem persists when chaning the ball radius. Using an depth image from the same position with a different mug produces the same pattern of missing triangles on the table plane.

I've also changed the orientation of the original camera by 1° (I want to use this in a reprojection pipeline for oblique viewpoints). For the same mug as before, this leads to a new pattern of missing triangles on the table plane, as can be seen below

PCD PCD_pointnormal

Mesh Mesh_2

Different mug, same camera position:

Mug2_Mesh

Same Mug, different original camera position:

Mug1_CameraPosition

Any idea of what is causing the problem here or any way to fix it? Could it be some kind of problem with moving the ball during the algorithm, like skipping certain spots?

anmakon commented 3 years ago

Hi @griegler, is there currently any progress underway with the ball pivoting algorithm? I could open a new issue as this one is already a couple months old, but the described problems seem to be very similar to what I'm experiencing.

Wuestengepard commented 3 years ago

Hello anmakon, have you found a solution to your problem? Meshing my PointCloud with the Ball-Pivoting results in a similar Mesh with a lot of holes.

image

anmakon commented 3 years ago

Hello @Wuestengepard, unfortunately, I haven't found a solution to this yet. I've checked the output of the ball pivoting algorithm in meshlab with the same pointcloud and there it looked fine. I've also gone through the original paper of the ball pivoting algorithm and this is definitely not the behaviour I would expect. I'll probably end up using the poisson algorithm instead of this one, the results seem to be more stable. Have you checked the normals of your point cloud and experimented a bit with the radii? That seems to be the root of the problem for some people.

Wuestengepard commented 3 years ago

Maybe the Poisson algorithm could work for me too. I will have a look at this. Yes, I checked the normals of the point cloud and experimented very much with the radii but with no success.

SterlingButters commented 9 months ago

Having the same problem here:

https://pasteboard.co/UltkegTytAJS.png https://pasteboard.co/mdxB4Bf01Zwm.png

You can see from inside the cone that the incorrectly oriented normals only contributes to some of the gaps. Moreover, I created a very dense list of radii which I was expecting to fill the holes (to no avail):

[bpa_mesh = o3d.geometry.TriangleMesh.create_from_point_cloud_ball_pivoting(pcd, o3d.utility.DoubleVector(np.linspace(.01, 10, 100)))](url)