-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Got 'Nan' when computing normals. #3
Comments
And there's no nan in input pc |
Could you please share with us the problematic pointcloud? This can happen if some points are alone in your search_radius of |
the input pointcloud is actually an output of a neural network, that's maybe why some points are single in the radius of 0.1 So maybe I should set the radius larger? |
Let's try with a larger radius and give us your feedback. I am curious about your work. |
When I added the neighbor search, I had point clouds that represent geometric objects in mind... so a search radius made more sense to me than a k neighbors search (so say a flat surface means no sharp angle within 0.1 meters). While a k neighbors search could yield unbalanced properties depending on the variation of the point density. Maybe in your case it would make more sense to use a k neighbors search instead. It's not implemented, but it could be added. |
I set a lager radius of I find one points cloud output that makes 'nan' when computing normals, but I don't know how to upload files in github. The problematic point seems to be far away from others, so I think @davidcaron 's thought is a good way to solve this problem. The k neighbors search is not available now, right? |
when I run
pc_normals = compute_features(pc.astype(np.float64), search_radius=0.1, feature_names=["nx","ny","nz"])
I got many ‘nan’
How can this happen?
pc_normals = compute_features(pc.astype(np.float64), search_radius=0.1, feature_names=["nx","ny","nz"])
(Pdb) print np.isnan(pc).sum()
0
(Pdb) n
/home/gy/PVCNet1014/Utils.py(95)Compute_Normals()
-> pc_normals = np.expand_dims(pc_normals, axis = 0)
(Pdb) print np.isnan(pc_normals).sum()
318
there are 318 nans
The text was updated successfully, but these errors were encountered: