-
Notifications
You must be signed in to change notification settings - Fork 15
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
error in poisson surface reconstruction edge case #111
Comments
Hi Vismay, could you please share the points and normal inputs? |
Hello! I actually ran into the same error when trying to run the SPSR code several weeks ago and ended up tracking down what's probably the cause of the issue. I believe that the root cause lies in lines 136-145: envelope_mult = 1.5 # how tightly we want to envelope the data
if (gs is None):
assert(h is not None)
assert(corner is not None)
gs = np.floor((np.max(envelope_mult*P,axis=0) - corner)/h).astype(int)
# print(gs)
# print(gs)
elif ((h is None) or (corner is None)):
h = (np.max(envelope_mult*P,axis=0) - np.min(envelope_mult*P,axis=0))/gs
corner = np.min(envelope_mult*P,axis=0) The Later down the line, this causes some values in I'm not sure what the intention is behind how envelope_mult = 1.5 # how tightly we want to envelope the data
center = np.mean(P, axis=0)
if (gs is None):
assert(h is not None)
assert(corner is not None)
gs = np.ceil((np.max(envelope_mult*(P-center)+center,axis=0) - corner)/h).astype(int)
# print(gs)
# print(gs)
elif ((h is None) or (corner is None)):
h = (np.max(envelope_mult*(P-center),axis=0) - np.min(envelope_mult*(P-center),axis=0))/gs
corner = np.min(envelope_mult*(P-center)+center,axis=0)
assert(gs.shape[0] == dim) This worked on a few very small test point clouds but I have not extensively been able to test the correctness of this solution. Would it also make sense to just add a padding to the size of the grid instead of using a multiplicative approach? |
I ran the function
poisson_surface_reconstruction(nerf_pts, nerf_normals, gs=np.array([50,50,50])
and it results in the error
File "<__array_function__ internals>", line 200, in ravel_multi_index ValueError: invalid entry in coordinates array
A possibly fix for it is using "mode: clip" in the np.ravel_multi_index function, or exposing that option to the user.
The text was updated successfully, but these errors were encountered: