-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Marching cubes algorithm on own x,y,z data #5176
Comments
@rajeshm71 can you tell us more specifically what you are aiming to do? The point of I'm going to close this issue because it is not a bug or feature request, but please feel free to continue the discussion below! |
Hi @jni Thanks for your reply. I have point cloud data as x,y,z coordinates in .ply format file. I am looking to get a surface by triangulation .I have tried with scipy.spatial.Delaunay but not getting proper results. so i was looking to reconstruct surface using marching cube algorithm. Is there any way by which i can convert pointcloud data to volumetric data and use marching cube algorithm for surface reconstruction in it. |
Yeah, Delaunay is actually not exactly what you need here, but I thought it might be good enough. I think that raster + marching cubes will probably also not give you good results. I found a guide that seems to do what you want, without scikit-image (which is not designed for point clouds). Here's an attempt for the point-cloud -> volume -> mesh pipeline: # input: z_coords, y_coords, x_coords
zint, yint, xint = [
np.floor(coords).astype(int)
for coords in [z_coords, y_coords, x_coords]
]
shape = tuple([np.max(intcoords) + 1
for intcoords in [zint, yint, xint]])
image = np.zeros(shape)
image[zint, yint, xint] += 1 You can then apply marching cubes to that image. But, to reiterate, I suggest you instead follow the guide in this blog post: |
Hello all,
I am using marching cubes lewinar algorithm for surfaces reconstruction in 3d . I have data in the format of x,y,z coordinates. How to convert it into 3d volumetric data.
suppose i have
x=np.array([1,2,3])
y=np.array([4,5,6])
z=np.array([7,8,9])
Note: I have taken 3 points just for exapmle purpose
marchine cubes algorithm requires data in 3d numpy array. plz help
The text was updated successfully, but these errors were encountered: