Volume of a meshed cloud

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Volume of a meshed cloud

Yves Daoust

 

I need to compute the volume inside a point cloud which represents a surface with a cylindrical topology.

 

I am meshing the surface with the ConcaveHull method then computing the volumes by summing the contributions of the facets.

 

My results do not seem correct and I strongly suspect that the meshing is not watertight. Hence several questions:

 

-          Is there a way to check that a mesh is watertight ?

 

-          Is there a better way to mesh ? [The GreedyProjectionTriangulation method gave unusable results.]

 

-          Is there an alternative way to estimate the volume of an unmeshed surface ?

 

 


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Volume of a meshed cloud

Sérgio Agostinho



On 22/02/2018 17:02, Yves Gmail wrote:

 

I need to compute the volume inside a point cloud which represents a surface with a cylindrical topology.

If you have a prior that this is a cylinder, a possible approach is to use  sample consensus to the estimate extract the parameters of your cylinder and compute the volume from there.

 

I am meshing the surface with the ConcaveHull method then computing the volumes by summing the contributions of the facets.

If you're able to switch to a convex hull representation (which should be ok, since a cylinder is convex object), you can use pcl::ConvexHull< PointInT >::getTotalVolume () to compute the volume. I'm sure the resultant convex hull ensures the water tightness required.

My results do not seem correct and I strongly suspect that the meshing is not watertight. Hence several questions:

 

-          Is there a way to check that a mesh is watertight ?

I don't believe there's anything in PCL to help you check for this.

 

-          Is there an alternative way to estimate the volume of an unmeshed surface ?

Probably. I'm sure this problem has been addressed in the literature most likely trying to avoid going through actual surface reconstruction.

Currently implemented in PCL: I don't believe there's any. Consider submitting a pull request if you decide to implement something down this road.

Cheers


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Volume of a meshed cloud

Yves Daoust

My surface doesn’t have a true cylindrical geometry, it is “slightly” concave (it’s a part of a leg).

 

Thanks for the answers.

 

From: PCL-users [mailto:[hidden email]] On Behalf Of Sérgio Agostinho
Sent: Sunday, February 25, 2018 11:47 AM
To: [hidden email]
Subject: Re: [PCL-users] Volume of a meshed cloud

 

 

 

On 22/02/2018 17:02, Yves Gmail wrote:

 

I need to compute the volume inside a point cloud which represents a surface with a cylindrical topology.

If you have a prior that this is a cylinder, a possible approach is to use  sample consensus to the estimate extract the parameters of your cylinder and compute the volume from there.

 

I am meshing the surface with the ConcaveHull method then computing the volumes by summing the contributions of the facets.

If you're able to switch to a convex hull representation (which should be ok, since a cylinder is convex object), you can use pcl::ConvexHull< PointInT >::getTotalVolume () to compute the volume. I'm sure the resultant convex hull ensures the water tightness required.

My results do not seem correct and I strongly suspect that the meshing is not watertight. Hence several questions:

 

-          Is there a way to check that a mesh is watertight ?

I don't believe there's anything in PCL to help you check for this.

 

-          Is there an alternative way to estimate the volume of an unmeshed surface ?

Probably. I'm sure this problem has been addressed in the literature most likely trying to avoid going through actual surface reconstruction.

Currently implemented in PCL: I don't believe there's any. Consider submitting a pull request if you decide to implement something down this road.

Cheers


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Volume of a meshed cloud

Sérgio Agostinho

The next thing I would look into then would be to try to create multiple convex hulls from your concave hull. Given a finite number of division, you can convexify everything. I'm not sure how achievable that actually is.

Cheers


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Volume of a meshed cloud

Stephen McDowell
I’m not familiar with how PCL represents meshes, but I think it is safe to assume that you have

- E: the list of edges
- V: the list of vertices
- F: the list of faces

There’s this really wonderful property called the Euler Characteristic (https://en.wikipedia.org/wiki/Euler_characteristic) or also called the Euler-Poincaré Formula (http://www.sjsu.edu/faculty/watkins/eulerpoincare0.htm) that can tell you if it is water-tight or not.

    |V| - |E| + |F| = 2

You don’t even need to know anything about topology or why it works!  Simply sum up the formula: if the number of vertices minus the number of edges plus the number of faces is equal to two, then it is water tight :)  It’s definitely one of my favorite formulas, it’s so cheap to compute, but so useful!




_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Volume of a meshed cloud

Yves Daoust

Interesting remark.

 

PCL represents meshes as a list of polygonal faces, where the vertices are indexes to a list of points. There is no explicit edge list and uniqueness of the elements is not guaranteed (a vertex common to several faces might be represented several times, and the edges common to these faces will not match), so some rework is necessary.

 

From: PCL-users [mailto:[hidden email]] On Behalf Of Stephen McDowell
Sent: Sunday, February 25, 2018 8:43 PM
To: Point Cloud Library (PCL) users <[hidden email]>
Subject: Re: [PCL-users] Volume of a meshed cloud

 

I’m not familiar with how PCL represents meshes, but I think it is safe to assume that you have

 

- E: the list of edges

- V: the list of vertices

- F: the list of faces

 

There’s this really wonderful property called the Euler Characteristic (https://en.wikipedia.org/wiki/Euler_characteristic) or also called the Euler-Poincaré Formula (http://www.sjsu.edu/faculty/watkins/eulerpoincare0.htm) that can tell you if it is water-tight or not.

 

    |V| - |E| + |F| = 2

 

You don’t even need to know anything about topology or why it works!  Simply sum up the formula: if the number of vertices minus the number of edges plus the number of faces is equal to two, then it is water tight :)  It’s definitely one of my favorite formulas, it’s so cheap to compute, but so useful!

 

 

 

 

Virus-free. www.avg.com

 


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users
Reply | Threaded
Open this post in threaded view
|

Re: Volume of a meshed cloud

Sérgio Agostinho
In reply to this post by Stephen McDowell

Very cool tip. I didn't know that one as well. Thanks



On 25-02-2018 19:42, Stephen McDowell wrote:
I’m not familiar with how PCL represents meshes, but I think it is safe to assume that you have

- E: the list of edges
- V: the list of vertices
- F: the list of faces

There’s this really wonderful property called the Euler Characteristic (https://en.wikipedia.org/wiki/Euler_characteristic) or also called the Euler-Poincaré Formula (http://www.sjsu.edu/faculty/watkins/eulerpoincare0.htm) that can tell you if it is water-tight or not.

    |V| - |E| + |F| = 2

You don’t even need to know anything about topology or why it works!  Simply sum up the formula: if the number of vertices minus the number of edges plus the number of faces is equal to two, then it is water tight :)  It’s definitely one of my favorite formulas, it’s so cheap to compute, but so useful!





_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users


_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Volume of a meshed cloud

Sérgio Agostinho

FYI I just realized there's a catch in Stephen's statement.

The Euler characteristic is only equal to 2 if the polyhedron is convex.

Still a cool tip. Thanks again Stephen.



On 28-02-2018 09:04, Sérgio Agostinho wrote:

Very cool tip. I didn't know that one as well. Thanks



On 25-02-2018 19:42, Stephen McDowell wrote:
I’m not familiar with how PCL represents meshes, but I think it is safe to assume that you have

- E: the list of edges
- V: the list of vertices
- F: the list of faces

There’s this really wonderful property called the Euler Characteristic (https://en.wikipedia.org/wiki/Euler_characteristic) or also called the Euler-Poincaré Formula (http://www.sjsu.edu/faculty/watkins/eulerpoincare0.htm) that can tell you if it is water-tight or not.

    |V| - |E| + |F| = 2

You don’t even need to know anything about topology or why it works!  Simply sum up the formula: if the number of vertices minus the number of edges plus the number of faces is equal to two, then it is water tight :)  It’s definitely one of my favorite formulas, it’s so cheap to compute, but so useful!





_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users



_______________________________________________
[hidden email] / http://pointclouds.org
http://pointclouds.org/mailman/listinfo/pcl-users

signature.asc (836 bytes) Download Attachment