Open enied27 opened 4 years ago
Hola @enied27 ! Thanks for the detailed question.
The Convex Hull is working as expected (https://en.wikipedia.org/wiki/Convex_hull), however it is a very limited algorithm for recovering the triangle mesh and relying on that for computing volume. The shape and distribution of your shared point cloud is just not a good fit for this approximation.
For this kind of data you could either use:
So. In order to use the grid-based approximation you could use PyntCloud only, but for the more elaborated surface reconstruction you would need to use other libraries (which are supported for easy integration with PyntCloud). I will try to post the code for both cases at the end of the day.
Hola @enied27 ! Thanks for the detailed question.
The Convex Hull is working as expected (https://en.wikipedia.org/wiki/Convex_hull), however it is a very limited algorithm for recovering the triangle mesh and relying on that for computing volume. The shape and distribution of your shared point cloud is just not a good fit for this approximation.
For this kind of data you could either use:
- a more elaborated surface reconstruction algorithm (i.e. poisson surface reconstruction)
- A grid-based approximate estimation of the volume. Assuming that your point cloud has a ~2.5D shape representing a surface (i.e. for some X, Y coordinate, there are not multiple relevant Z values). I think that this is the case of your point cloud.
So. In order to use the grid-based approximation you could use PyntCloud only, but for the more elaborated surface reconstruction you would need to use other libraries (which are supported for easy integration with PyntCloud). I will try to post the code for both cases at the end of the day.
Could you please share the code for this?
Greetings!
I think my issue is not a bug or a feature request; I am looking for help with a problem for my specific data set and how I am setting up the problem.
I have a point cloud in CSV format (I uploaded it as .xlsx because Github wouldn't let me upload a .csv):
deposit.xlsx
This is (X,Y,Z) data from a scanner that describes a surface of an object.
I can plot it with this code:
The plot looks like this:
As you can see, it is mostly a cone, but there is some rough area near the base. Also, there are small features away from the cone. What I want is the volume of everything that is above the z=0 plane.
I downloaded Pyntcloud after I saw this stack overflow post: https://stackoverflow.com/questions/44997054/point-cloud-to-volume I am following the same procedure.
I use the following code:
However, when I do this, I am not getting a mesh of my object. Instead, the system creates a pyramid, with the max height of my object as the vertex. The mesh looks like this:
By the way, I know the answer to what the volume should be. It should be about 22. Does anyone see what I've overlooked? Do I need a finer mesh to capture the features of my surface?
Thanks,
Eric