Create mesh from point cloud - mesh

I have a set of points that need to be constructed as a set of triangular faces to form a solid mesh. I have looked at Delaunay Triangulation and none of it makes sense.
Any advice on where to begin? I am not dealing with complex shapes, they consist of 200 vertices max.
Note: the points are in x,y,z space.

There are variety of options to construct mesh from vertices:
1: You can use Poisson reconstruction
http://www.cs.jhu.edu/~misha/Code/PoissonRecon/Version5.7/
it is also implemented meshlab which is open source http://gmv.cast.uark.edu/scanning/point-clouds-to-mesh-in-meshlab/ and also in PCL http://pointclouds.org/
2: Another option is marching cubes, you can also find an implementation in PCL

Related

MeshLab Face Count

Not sure if I'm supposed to ask this question here, but going to give it a try since MeshLab doesn't seem to respond to issues on GitHub fast..
When I imported a mesh consisting of 100 vertices and 75 quad faces, meshlab somehow recognizes it to have 146 faces. What is the problem here?
Please find here the OBJ file and below the screenshot:
Any help/advice would be greatly appreciated,
Thank you!
Tim
Yes, per the MeshLab homepage Stack Overflow is now the recommended place to ask questions. Github should be reserved for reporting actual bugs.
It is important to understand is that MeshLab is designed to work with large unstructured triangular meshes, and while it can do some things with quad and polygonal meshes, there are some limitations and idiosyncrasies.
MeshLab essentially treats all meshes as triangular for most operations; when a polygonal mesh is opened, MeshLab creates "faux edges" that subdivide the mesh into triangles. You can visualize the faux edges by turning "Polygonal Modality" on or off in the edge display pane. If you run "Compute Geometric Measures", it will provide different lengths for the edges both with and without the faux edges. This is why MeshLab is reporting a higher number of faces for your model; it is reporting the number of faces after triangulation, i.e. including the faux edge subdivision. As you can see, when dividing the number of quad faces (75) in half, you end up with nearly double the number of triangular faces (146), which makes sense. Unfortunately I don't know of a way to have MeshLab report the number of faces without these faux edges.
Most filters only work on triangular meshes, and if run on a polygonal mesh the faux edges will be used. A few specific filters (e.g. those in the "Polygonal and Quad Mesh" category) work with quads, and for these the faux edges should be ignored. When exporting, if you check "polygonal" the faux edges should be discarded and the mesh will be saved with the proper polygons, otherwise the mesh will be permanently triangulated per the faux edges.
Hope this helps!

3d surface triangulation of an open surface with CGAL

I'm a newbie to CGAL library. However, I think it's a very suitable package for what I want to do.
I have a set of points representing a 3D surface (as shown in figure 1).
I want to fit a 3d triangulation on this surface. The surface is not closed and therefore does not occupy a volume. The code provided in poisson_reconstruction_example.cpp seems appropriate for this job. But the problem is that as a part of poisson_reconstruction algorithm it closes the ends and underneath of the surface to make it a volume (see figure2).
I was wondering:
1- Is there a way to do the triangulation on the surface just defined by the points, without getting a closed surface which encloses a finite volume?
This means that the final triangulation has boundary edges.
I'm happy with any Upsampling or smoothing which may be needed.
2- If the answer to the first question is no, then, is there any way to guarantee that the input points are the vertices of the generated triangles?
The poisson surface reconstruction generates a close surface that interpolates the point cloud given as input. It requires as input a point set with normals.
If you need a algorithm that only uses input points in the output, you can try the Advancing Front Surface Reconstruction algorithm.

Mesh to mesh. Mesh fitting (averaging). Mesh comparison.

I have 3 sets of point cloud that represent one surface. I want to use these point clouds to construct triangular mesh, then use the mesh to represent the surface. Each set of point cloud is collected in different ways so their representation to this surface are different. For example, some sets can represent the surface with smaller "error". My questions are:
(1) What's the best way to evaluate such mesh-to-surface "error"?
(2) Is there a mature/reliable way to convert point cloud to triangular mesh? I found some software doing this but most requests extensive manual adjustment.
(3) After the conversion I get three meshes. I want to use a fourth mesh, namely Mesh4, to "fit" the three meshes, and get an "average" mesh of the three. Then I can use this Mesh4 as a representation of the underlying surface. How can I do/call this "mesh to mesh" fitting? Is it a mature technique?
Thank you very much for your time!
Please find below my answers for point 1 and 2:
as a metric for mesh-to-surface error you can use Hausdorff distance. For example, you could use Libigl to compare two meshes.
To obtain a mesh from a point cloud, have a look at PCL

Tetrahedralization from surface mesh of thin-walled object

I need to generate a tetrahedral (volume) mesh of thin-walled object object. Think of objects like a bottle or a plastic bowl, etc, which are mostly hollow. The volumetric mesh is needed for an FEM simulation. A surface mesh of the outside surface of the object is available from measurement, using e.g. octomap or KinectFusion. Therefore the vertex spacing is relatively regular. The inner surface of the object can be calculated from the outside surface by moving all points inside, since the wall thickness is known.
So far, I have considered the following approaches:
Create a 3D Delaunay triangulation (which would destroy the existing surface meshes) and then remove all tetrahedra which are not between the two original surfaces. For this check, it might be required to create an implicit surface representation of the 2 surfaces.
Create a 3D Delaunay triangulation and remove tetrahedra which are "inside" (in the hollow space) or "outside" (of the outer surface) with Alphashapes.
Close the outside and inside meshes and load them into tetgen as the outside hull and as a hole respectively.
These approaches seem to be a bit inelegant to me, and they still have some pitfalls. I would probably need several libraries/tools for them. For 1 and 2, probably tetgen or another FEM meshing tool would still be required to create well-conditioned tetrahedra. Does anyone have a more straight-forward solution? I guess this should also be a common problem in 3D printing.
Concerning tools/libraries, I have looked into PCL, meshlab and tetgen so far. They all seem to do only part of the job. Ideally, I would like to use only open source libraries and avoid tools which require manual intervention.
One way is to:
create triangular mesh of surface points,
extrude (move) that surface to inner for a given thickness. That produces volume (triangular prism) mesh of a wall,
each prism can be split in three tetrahedrons.
The problem I see is aspect ratio.
A single layer of tetrahedra will not reproduce shell or bending behavior very well. A single element through the thickness will already require a large mesh. Putting more than one will likely break the bank in order to keep aspect ratios and angles acceptable.
I'd prefer brick or thick shell elements to tetrahedra in this case. I think the modeling will be easier and the behavior will be more faithful to the physics.

How to get one non-manifod mesh with adaptive point distribution

all
I try to obtain one triangle mesh from one point cloud. The mesh is expected to be manifold, the triangles are well shaped or equilateral and the distribution of the points are adaptive in terms of the curvature.
There are valuable information provided on this website.
robust algorithm for surface reconstruction from 3D point cloud?
Mesh generation from points with x, y and z coordinates
I try Poisson reconstruction algorithm, but the triangles are not well shaped.
So I need to improve the quality of the triangles. I learn that centroidal voronoi tessellation(CVT) can achieve that, but I don't know whether the operation will introduce non-manifold vertices and self-intersection. I hope to get some information about it from you.
The mesh from the following post looks pretty good.
How to fill polygon with points regularly?
Delaunay refinement algorithm is used. Can delaunay refinement algorithm apply to triangle mesh directly? Do I first need to delaunay triangulation of the point cloud of the mesh, and then use the information from delaunay triangulation to perform delaunay refinement?
Thanks.
Regards
Jogging
I created the image in the mentioned post: You can insert all points into a Delaunay triangulation and then create a Zone object (area) consisting of these triangles. Then you call refine(pZone,...) to get a quality mesh. Other options are to create the Zone from constraint edges or as the result of a boolean operation. However, this library is made for 2D and 2.5D. The 3D version will not be released before 2014.
Do you know the BallPivoting approach?